From f16cb1866ab510f809ecf1ff1667f033e73ad0ff Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 18 Aug 2024 12:20:09 +0200 Subject: [PATCH] Fix ZEND_FASTCALL definition wrt. x64 Windows clang builds (GH-15425) As is, MSVC uses `__vectorcall`, but clang uses `__cdecl`. This obviously is bad for interoperability (and causes link issues), and is likely worse for FFI which offers some limited (but likely sufficient for our purposes) support for `__vectorcall` on Windows. Since clang claims to support `__vectorcall` as of 3.6.0, and we bumped the requirements to clang 4.0.0 already, there shouldn't be any issues. --- Zend/zend_portability.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 5290d7aae4f..5be8d7e4f5c 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -306,7 +306,7 @@ char *alloca(); # define ZEND_FASTCALL __attribute__((fastcall)) #elif defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER == 1700 # define ZEND_FASTCALL __fastcall -#elif defined(_MSC_VER) && _MSC_VER >= 1800 && !defined(__clang__) +#elif defined(_MSC_VER) && _MSC_VER >= 1800 # define ZEND_FASTCALL __vectorcall #else # define ZEND_FASTCALL