Skip to content

Commit 8a9095a

Browse files
authored
Define PHP_HAVE_BUILTIN_EXPECT for Clang on Windows (phpGH-17457)
Clang supports `__builtin_expect()` at least as of 4.0.0, which is the (theoretical) minimum required on Windows, so we define it unconditionally. This also solves some macro redefinition warnings in JIT-IR.
1 parent e64f674 commit 8a9095a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

win32/build/config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ if (VS_TOOLSET) {
370370
}
371371
}
372372
} else if (CLANG_TOOLSET) {
373+
AC_DEFINE("PHP_HAVE_BUILTIN_EXPECT", 1, "Define to 1 if the compiler supports '__builtin_expect'.");
373374
AC_DEFINE("PHP_HAVE_BUILTIN_SADDL_OVERFLOW", 1, "Define to 1 if the compiler supports '__builtin_saddl_overflow'.");
374375
AC_DEFINE("PHP_HAVE_BUILTIN_SADDLL_OVERFLOW", 1, "Define to 1 if the compiler supports '__builtin_saddll_overflow'.");
375376
AC_DEFINE("PHP_HAVE_BUILTIN_SSUBL_OVERFLOW", 1, "Define to 1 if the compiler supports '__builtin_ssubl_overflow'.");

0 commit comments

Comments
 (0)