From f911931e423770f295d76252122475e951fc3d2f Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 15 Aug 2024 15:06:33 +0200 Subject: [PATCH] Fix ZEND_FASTCALL definition wrt. x64 Windows clang builds 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 5290d7aae4fe3..5be8d7e4f5ced 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