From f98d8f6c159ddcbc652eaa7f0f6e6a67edf963d5 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 7 Jan 2017 02:25:00 +0100 Subject: [PATCH] /guard is also a security flag --- win32/build/confutils.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/win32/build/confutils.js b/win32/build/confutils.js index d68655b59d7..8eb0c19a9d0 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2856,7 +2856,9 @@ function toolset_setup_common_cflags() ADD_FLAG('CFLAGS', ' /RTC1 '); } else { if (VCVERS >= 1900) { - ADD_FLAG('CFLAGS', "/guard:cf"); + if (PHP_SECURITY_FLAGS == "yes") { + ADD_FLAG('CFLAGS', "/guard:cf"); + } } } @@ -2888,7 +2890,9 @@ function toolset_setup_common_ldlags() if (VS_TOOLSET) { if (VCVERS >= 1900) { - ADD_FLAG('LDFLAGS', "/GUARD:CF"); + if (PHP_SECURITY_FLAGS == "yes") { + ADD_FLAG('LDFLAGS', "/GUARD:CF"); + } } } }