]> granicus.if.org Git - php/commitdiff
added /guard:cf to release builds
authorAnatol Belski <ab@php.net>
Wed, 19 Aug 2015 08:56:43 +0000 (10:56 +0200)
committerAnatol Belski <ab@php.net>
Wed, 19 Aug 2015 08:56:43 +0000 (10:56 +0200)
win32/build/confutils.js

index 3bab5dcb9fd734fbf072f8646d135a0ae85434b8..355327156dee8e6781e08d026c3d611303b9a0de 100644 (file)
@@ -2641,6 +2641,10 @@ function toolset_setup_common_cflags()
                if (PHP_DEBUG == "yes") {
                        // Set some debug/release specific options
                        ADD_FLAG('CFLAGS', ' /RTC1 ');
+               } else {
+                       if (VCVERS >= 1900) {
+                               ADD_FLAG('CFLAGS', "/guard:cf");
+                       }
                }
 
        } else if (CLANG_TOOLSET) {
@@ -2668,6 +2672,12 @@ function toolset_setup_common_ldlags()
 
        // we want msvcrt in the PHP DLL
        ADD_FLAG("PHP_LDFLAGS", "/nodefaultlib:libcmt");
+
+       if (VS_TOOLSET) {
+               if (VCVERS >= 1900) {
+                       ADD_FLAG('LDFLAGS', "/GUARD:CF");
+               }
+       }
 }
 
 function toolset_setup_common_libs()