From d9301703fb1086cafbd730c17e3d450a192485d6 Mon Sep 17 00:00:00 2001 From: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com> Date: Sat, 4 Dec 2021 03:47:38 +0800 Subject: [PATCH] bpo-45816: Support building with VS 2022 (v143 toolset) on Windows (GH-29577) --- Misc/NEWS.d/next/Build/2021-11-16-14-44-06.bpo-45816.nbdmVK.rst | 1 + PCbuild/pyproject.props | 2 +- PCbuild/python.props | 2 +- PCbuild/pythoncore.vcxproj | 2 +- Tools/msi/bundle/bootstrap/pythonba.vcxproj | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2021-11-16-14-44-06.bpo-45816.nbdmVK.rst diff --git a/Misc/NEWS.d/next/Build/2021-11-16-14-44-06.bpo-45816.nbdmVK.rst b/Misc/NEWS.d/next/Build/2021-11-16-14-44-06.bpo-45816.nbdmVK.rst new file mode 100644 index 00000000000..4a14c90bf01 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-11-16-14-44-06.bpo-45816.nbdmVK.rst @@ -0,0 +1 @@ +Python now supports building with Visual Studio 2022 (MSVC v143, VS Version 17.0). Patch by Jeremiah Vivian. \ No newline at end of file diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index bbcabb5cdb4..0eaeb6b1229 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -73,7 +73,7 @@ PGInstrument PGUpdate advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;%(AdditionalDependencies) - /OPT:REF,NOICF %(AdditionalOptions) + /OPT:REF,NOICF /CGTHREADS:1 /PDBTHREADS:1 %(AdditionalOptions) true diff --git a/PCbuild/python.props b/PCbuild/python.props index c608fb9ee71..7b85ad1c94f 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -11,7 +11,7 @@ We set BasePlatformToolset for ICC's benefit, it's otherwise ignored. --> - v142 + v143 v142 v141 v140 diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index b446e099556..119650a1eec 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -588,7 +588,7 @@ - + diff --git a/Tools/msi/bundle/bootstrap/pythonba.vcxproj b/Tools/msi/bundle/bootstrap/pythonba.vcxproj index ef71fe7da08..d90b5e3ff00 100644 --- a/Tools/msi/bundle/bootstrap/pythonba.vcxproj +++ b/Tools/msi/bundle/bootstrap/pythonba.vcxproj @@ -73,4 +73,4 @@ - \ No newline at end of file +