diff options
author | Anatol Belski <ab@php.net> | 2018-02-05 10:38:06 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-02-05 10:38:06 +0100 |
commit | 1368aea352efc262d16ee9dc8e3d019908180b09 (patch) | |
tree | 01f9104b51d0becc6e2ac8112ffcd9a4e6c74802 | |
parent | 42f2ae0572e61da94246c910ec0cf1eddd221cd1 (diff) | |
download | php-git-1368aea352efc262d16ee9dc8e3d019908180b09.tar.gz |
Finer conditions, so /Qspectre is already usable with latest vc15
-rw-r--r-- | win32/build/confutils.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js index d8a8e34307..f08e747fd2 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -3069,11 +3069,11 @@ function toolset_setup_common_cflags() ADD_FLAG('CFLAGS', ' /RTC1 '); } else { if (PHP_DEBUG == "no" && PHP_SECURITY_FLAGS == "yes") { - /* Mitigations for Spectre variant 1, see - https://blogs.msdn.microsoft.com/vcblog/2018/01/15/spectre-mitigations-in-msvc/ - TODO backport for all supported VS versions when they release it. */ + /* Mitigations for CVE-2017-5753. + TODO backport for all supported VS versions when they release it. */ if (VCVERS >= 1912) { - if (VCVERS >= 1913) { + var subver1912 = probe_binary(PHP_CL).substr(6); + if (VCVERS >= 1913 || 1912 == VCVERS && subver1912 >= 25835) { ADD_FLAG('CFLAGS', "/Qspectre"); } else { /* Undocumented. */ |