diff options
author | Steve Dower <steve.dower@python.org> | 2023-03-29 14:33:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-29 14:33:39 (GMT) |
commit | 4abf1f1e3fe91f905faa6dd269c7a9aefea2a5a8 (patch) | |
tree | c182c5e28994d564373d5697fd2adff84e52cf1e /PCbuild | |
parent | 473fd7bbf0508074f28f020801c207a8d379637b (diff) | |
download | cpython-4abf1f1e3fe91f905faa6dd269c7a9aefea2a5a8.zip cpython-4abf1f1e3fe91f905faa6dd269c7a9aefea2a5a8.tar.gz cpython-4abf1f1e3fe91f905faa6dd269c7a9aefea2a5a8.tar.bz2 |
gh-103097: Add workaround for Windows ARM64 compiler bug (GH-103098)
See https://developercommunity.visualstudio.com/t/Regression-in-MSVC-1433-1434-ARM64-co/10224361 for details of the issue. It only applies to version 14.34.
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/pyproject.props | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index f306897..28fa0e8 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -21,6 +21,13 @@ <LinkIncremental Condition="$(Configuration) != 'Debug'">false</LinkIncremental> </PropertyGroup> + <PropertyGroup Label="MSVC Bug Workarounds" Condition="$(VCToolsVersion) != ''"> + <_VCToolsVersion>$([System.Version]::Parse(`$(VCToolsVersion)`).Major).$([System.Version]::Parse(`$(VCToolsVersion)`).Minor)</_VCToolsVersion> + + <!-- See https://developercommunity.visualstudio.com/t/Regression-in-MSVC-1433-1434-ARM64-co/10224361 --> + <MSVCHasBrokenARM64Clamping Condition="$(_VCToolsVersion) == '14.34'">true</MSVCHasBrokenARM64Clamping> + </PropertyGroup> + <PropertyGroup> <_DebugPreprocessorDefinition>NDEBUG;</_DebugPreprocessorDefinition> <_DebugPreprocessorDefinition Condition="$(Configuration) == 'Debug'">_DEBUG;</_DebugPreprocessorDefinition> @@ -47,6 +54,7 @@ <WholeProgramOptimization>true</WholeProgramOptimization> <ControlFlowGuard Condition="$(EnableControlFlowGuard) != ''">$(EnableControlFlowGuard)</ControlFlowGuard> <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions Condition="$(MSVCHasBrokenARM64Clamping) == 'true' and $(Platform) == 'ARM64'">-d2pattern-opt-disable:-932189325 %(AdditionalOptions)</AdditionalOptions> </ClCompile> <ClCompile Condition="$(Configuration) == 'Debug'"> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> @@ -76,6 +84,7 @@ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">PGUpdate</LinkTimeCodeGeneration> <AdditionalDependencies>advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalOptions Condition="$(Configuration) != 'Debug'">/OPT:REF,NOICF /CGTHREADS:1 /PDBTHREADS:1 %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions Condition="$(MSVCHasBrokenARM64Clamping) == 'true' and $(Platform) == 'ARM64'">-d2:-pattern-opt-disable:-932189325 %(AdditionalOptions)</AdditionalOptions> </Link> <Lib> <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">true</LinkTimeCodeGeneration> |