From 83996ea330979413f450dcba8f77375f88e8bde4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Wed, 4 May 2022 11:10:50 +0200 Subject: [PATCH] Enable Intel CET on Windows by default --- win32/build/confutils.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/win32/build/confutils.js b/win32/build/confutils.js index bf88cdae442cd..6ded399567997 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -3394,10 +3394,13 @@ function toolset_setup_common_ldlags() ADD_FLAG("PHP_LDFLAGS", "/nodefaultlib:libcmt"); if (VS_TOOLSET) { - if (VCVERS >= 1900) { - if (PHP_SECURITY_FLAGS == "yes") { + if (PHP_SECURITY_FLAGS == "yes") { + if (VCVERS >= 1900) { ADD_FLAG('LDFLAGS', "/GUARD:CF"); } + if (VCVERS >= 1920) { + ADD_FLAG('LDFLAGS', "/CETCOMPAT"); + } } } }