From: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
Date: Fri, 3 Dec 2021 19:47:38 +0000 (+0800)
Subject: bpo-45816: Support building with VS 2022 (v143 toolset) on Windows (GH-29577)
X-Git-Tag: v3.11.0a3~60
X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9301703fb1086cafbd730c17e3d450a192485d6;p=thirdparty%2FPython%2Fcpython.git
bpo-45816: Support building with VS 2022 (v143 toolset) on Windows (GH-29577)
---
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 000000000000..4a14c90bf013
--- /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 bbcabb5cdb40..0eaeb6b1229a 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 c608fb9ee718..7b85ad1c94f1 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 b446e0995565..119650a1eec5 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 ef71fe7da08d..d90b5e3ff000 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
+