From: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> Date: Tue, 25 Mar 2025 23:07:52 +0000 (+0100) Subject: GH-131691: Fix exception handling setting for clang-cl on Windows (GH-131730) X-Git-Tag: v3.14.0a7~190 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=488174dc68f90217fd43aa95d87441cc6bad6a29;p=thirdparty%2FPython%2Fcpython.git GH-131691: Fix exception handling setting for clang-cl on Windows (GH-131730) The /EHa option for Clang-CL behaves differently than the same option for MSVC, which is why we don't use it for both compilers. --- diff --git a/Misc/NEWS.d/next/Build/2025-03-25-19-14-24.gh-issue-131691.2BgHU5.rst b/Misc/NEWS.d/next/Build/2025-03-25-19-14-24.gh-issue-131691.2BgHU5.rst new file mode 100644 index 000000000000..b9567643cdb1 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2025-03-25-19-14-24.gh-issue-131691.2BgHU5.rst @@ -0,0 +1,2 @@ +clang-cl on Windows needs option ``/EHa`` to support SEH (structured +exception handling) correctly. Fix by Chris Eibl. diff --git a/PCbuild/pyproject-clangcl.props b/PCbuild/pyproject-clangcl.props index d949c37d5625..a574cf84ee5d 100644 --- a/PCbuild/pyproject-clangcl.props +++ b/PCbuild/pyproject-clangcl.props @@ -38,6 +38,14 @@ + + Async -Wno-deprecated-non-prototype -Wno-unused-label -Wno-pointer-sign -Wno-incompatible-pointer-types-discards-qualifiers -Wno-unused-function %(AdditionalOptions) -m32 %(AdditionalOptions) -m64 %(AdditionalOptions) diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index b5a236ee3e37..4e414dc913b9 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -25,9 +25,6 @@ false - - - $(TargetName)$(TargetExt) <_TargetNameSep>$(TargetNameExt.LastIndexOf(`.`)) @@ -130,6 +127,13 @@ + + +