From 036a2c12010bcc1d8bf35c4550984a8245f9ab5f Mon Sep 17 00:00:00 2001
From: "Miss Islington (bot)"
<31488909+miss-islington@users.noreply.github.com>
Date: Thu, 23 Jun 2022 12:50:36 -0700
Subject: bpo-45816: Support building with VS 2022 (v143 toolset) on Windows
(GH-29577)
(cherry picked from commit d9301703fb1086cafbd730c17e3d450a192485d6)
Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
---
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 0000000..4a14c90
--- /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 5af68b2..f306897 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -75,7 +75,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 c451429..859f9db 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 3ba6358..fe8b2c9 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -544,7 +544,7 @@
-
+
diff --git a/Tools/msi/bundle/bootstrap/pythonba.vcxproj b/Tools/msi/bundle/bootstrap/pythonba.vcxproj
index ef71fe7..d90b5e3 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
+
--
cgit v0.12