Skip to content

Commit

Permalink
Finer conditions, so /Qspectre is already usable with latest vc15
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Feb 5, 2018
1 parent 42f2ae0 commit 1368aea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions win32/build/confutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 1368aea

Please sign in to comment.