Skip to content

Commit f16cb18

Browse files
authored
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.
1 parent 7fa2dbf commit f16cb18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_portability.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ char *alloca();
306306
# define ZEND_FASTCALL __attribute__((fastcall))
307307
#elif defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER == 1700
308308
# define ZEND_FASTCALL __fastcall
309-
#elif defined(_MSC_VER) && _MSC_VER >= 1800 && !defined(__clang__)
309+
#elif defined(_MSC_VER) && _MSC_VER >= 1800
310310
# define ZEND_FASTCALL __vectorcall
311311
#else
312312
# define ZEND_FASTCALL

0 commit comments

Comments
 (0)