Skip to content

Commit

Permalink
Define PHP_HAVE_BUILTIN_EXPECT for Clang on Windows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cmb69 committed Jan 15, 2025
1 parent b7169a2 commit a14ecac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions win32/build/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ if (VS_TOOLSET) {
}
}
} else if (CLANG_TOOLSET) {
AC_DEFINE("PHP_HAVE_BUILTIN_EXPECT", 1, "Define to 1 if the compiler supports '__builtin_expect'.");
AC_DEFINE("PHP_HAVE_BUILTIN_SADDL_OVERFLOW", 1, "Define to 1 if the compiler supports '__builtin_saddl_overflow'.");
AC_DEFINE("PHP_HAVE_BUILTIN_SADDLL_OVERFLOW", 1, "Define to 1 if the compiler supports '__builtin_saddll_overflow'.");
AC_DEFINE("PHP_HAVE_BUILTIN_SSUBL_OVERFLOW", 1, "Define to 1 if the compiler supports '__builtin_ssubl_overflow'.");
Expand Down

0 comments on commit a14ecac

Please sign in to comment.