mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Rework --with-codegen-arch and --enable-native-intrinsics config
This commit is contained in:
parent
abf5534113
commit
d9994ff7b2
2 changed files with 17 additions and 8 deletions
|
@ -3122,16 +3122,20 @@ function toolset_setup_arch()
|
|||
|
||||
function toolset_setup_codegen_arch()
|
||||
{
|
||||
if("no" == PHP_CODEGEN_ARCH) {
|
||||
if("no" == PHP_CODEGEN_ARCH || "yes" == PHP_CODEGEN_ARCH) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (VS_TOOLSET) {
|
||||
var arc = PHP_CODEGEN_ARCH.toUpperCase();
|
||||
|
||||
if ("AVX2" == arc || "AVX" == arc || "SSE2" == arc || "SSE" == arc || "IA32" == arc) {
|
||||
ADD_FLAG("CFLAGS", "/arch:" + arc);
|
||||
if ("IA32" != arc) {
|
||||
ERROR("Only IA32 arch is supported by --with-codegen-arch, got '" + arc + "'");
|
||||
} else if (X64) {
|
||||
ERROR("IA32 arch is only supported with 32-bit build");
|
||||
}
|
||||
ADD_FLAG("CFLAGS", "/arch:" + arc);
|
||||
PHP_NATIVE_INTRINSICS = "disabled";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3236,6 +3240,10 @@ function toolset_setup_intrinsic_cflags()
|
|||
var scale = new Array("sse", "sse2", "sse3", "ssse3", "sse4.1", "sse4.2", "avx", "avx2");
|
||||
|
||||
if (VS_TOOLSET) {
|
||||
if ("disabled" == PHP_NATIVE_INTRINSICS) {
|
||||
ERROR("Can't enable intrinsics, --with-codegen-arch passed with an incompatible option. ")
|
||||
}
|
||||
|
||||
if ("no" == PHP_NATIVE_INTRINSICS || "yes" == PHP_NATIVE_INTRINSICS) {
|
||||
PHP_NATIVE_INTRINSICS = default_enabled;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue