summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-06-10 13:50:26 (GMT)
committerGitHub <noreply@github.com>2022-06-10 13:50:26 (GMT)
commit516d90eb215315a120e0a7168db68540321bb478 (patch)
tree45351b548f9dc6d41a8391eb8dddcb1bdc4172d5 /PC
parent175ed6e52c7bf6d9805ac8b56ad3f38e46ff7de5 (diff)
downloadcpython-516d90eb215315a120e0a7168db68540321bb478.zip
cpython-516d90eb215315a120e0a7168db68540321bb478.tar.gz
cpython-516d90eb215315a120e0a7168db68540321bb478.tar.bz2
gh-93491: Add support tier detection to configure (GH-93492)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Steve Dower <steve.dower@microsoft.com> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com> (cherry picked from commit 3124d9a5aafb64431aa9facd0ae0e12201be77fa) Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'PC')
-rw-r--r--PC/pyconfig.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 5a96a4e..f71d5fe 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -113,20 +113,30 @@ WIN32 is still required for the locale module.
#define MS_WIN64
#endif
-/* set the COMPILER */
+/* set the COMPILER and support tier
+ *
+ * win_amd64 MSVC (x86_64-pc-windows-msvc): 1
+ * win32 MSVC (i686-pc-windows-msvc): 1
+ * win_arm64 MSVC (aarch64-pc-windows-msvc): 3
+ * other archs and ICC: 0
+ */
#ifdef MS_WIN64
#if defined(_M_X64) || defined(_M_AMD64)
#if defined(__INTEL_COMPILER)
#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 64 bit (amd64) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
+#define PY_SUPPORT_TIER 0
#else
#define COMPILER _Py_PASTE_VERSION("64 bit (AMD64)")
+#define PY_SUPPORT_TIER 1
#endif /* __INTEL_COMPILER */
#define PYD_PLATFORM_TAG "win_amd64"
#elif defined(_M_ARM64)
#define COMPILER _Py_PASTE_VERSION("64 bit (ARM64)")
+#define PY_SUPPORT_TIER 3
#define PYD_PLATFORM_TAG "win_arm64"
#else
#define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
+#define PY_SUPPORT_TIER 0
#endif
#endif /* MS_WIN64 */
@@ -173,15 +183,19 @@ typedef _W64 int Py_ssize_t;
#if defined(_M_IX86)
#if defined(__INTEL_COMPILER)
#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 32 bit (Intel) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
+#define PY_SUPPORT_TIER 0
#else
#define COMPILER _Py_PASTE_VERSION("32 bit (Intel)")
+#define PY_SUPPORT_TIER 1
#endif /* __INTEL_COMPILER */
#define PYD_PLATFORM_TAG "win32"
#elif defined(_M_ARM)
#define COMPILER _Py_PASTE_VERSION("32 bit (ARM)")
#define PYD_PLATFORM_TAG "win_arm32"
+#define PY_SUPPORT_TIER 0
#else
#define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)")
+#define PY_SUPPORT_TIER 0
#endif
#endif /* MS_WIN32 && !MS_WIN64 */