summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Build/2021-06-10-18-08-44.bpo-44381.Xpc1iX.rst2
-rw-r--r--PCbuild/pyproject.props4
2 files changed, 4 insertions, 2 deletions
diff --git a/Misc/NEWS.d/next/Build/2021-06-10-18-08-44.bpo-44381.Xpc1iX.rst b/Misc/NEWS.d/next/Build/2021-06-10-18-08-44.bpo-44381.Xpc1iX.rst
new file mode 100644
index 0000000..002112c
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2021-06-10-18-08-44.bpo-44381.Xpc1iX.rst
@@ -0,0 +1,2 @@
+The Windows build now accepts :envvar:`EnableControlFlowGuard` set to
+``guard`` to enable CFG.
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
index 834b27c..d492b71 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -44,11 +44,11 @@
<CompileAs>Default</CompileAs>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">OnlyExplicitInline</InlineFunctionExpansion>
- <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">OnlyExplicitInline</InlineFunctionExpansion>
+ <ControlFlowGuard Condition="$(EnableControlFlowGuard) != ''">$(EnableControlFlowGuard)</ControlFlowGuard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Condition="$(Configuration) == 'Debug'">
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<Optimization>Disabled</Optimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>