@@ -138,17 +138,24 @@ WIN32 is still required for the locale module.
138138#define MS_WIN64
139139#endif
140140
141+ #ifdef __clang__
142+ #define _Py_CLANG_COMPILER (platform ) ( \
143+ "[Clang " _Py_STRINGIZE(__clang_major__) "." _Py_STRINGIZE(__clang_minor__) \
144+ "." _Py_STRINGIZE(__clang_patchlevel__) " " platform \
145+ " with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
146+ #endif
147+
141148/* set the COMPILER and support tier
142149 *
143150 * win_amd64 MSVC (x86_64-pc-windows-msvc): 1
144151 * win32 MSVC (i686-pc-windows-msvc): 1
145152 * win_arm64 MSVC (aarch64-pc-windows-msvc): 3
146- * other archs and ICC: 0
153+ * other archs and clang-cl/ ICC: 0
147154 */
148155#ifdef MS_WIN64
149156#if defined(_M_X64 ) || defined(_M_AMD64 )
150157#if defined(__clang__ )
151- #define COMPILER ("[Clang " __clang_version__ "] 64 bit (AMD64) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT] ")
158+ #define COMPILER _Py_CLANG_COMPILER(" 64 bit (AMD64)")
152159#define PY_SUPPORT_TIER 0
153160#elif defined(__INTEL_COMPILER )
154161#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 64 bit (amd64) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
@@ -159,8 +166,13 @@ WIN32 is still required for the locale module.
159166#endif /* __clang__ */
160167#define PYD_PLATFORM_TAG "win_amd64"
161168#elif defined(_M_ARM64 )
169+ #if defined(__clang__ )
170+ #define COMPILER _Py_CLANG_COMPILER("64 bit (ARM64)")
171+ #define PY_SUPPORT_TIER 0
172+ #else
162173#define COMPILER _Py_PASTE_VERSION("64 bit (ARM64)")
163174#define PY_SUPPORT_TIER 3
175+ #endif /* __clang__ */
164176#define PYD_PLATFORM_TAG "win_arm64"
165177#else
166178#define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
@@ -210,7 +222,7 @@ typedef _W64 int Py_ssize_t;
210222#if defined(MS_WIN32 ) && !defined(MS_WIN64 )
211223#if defined(_M_IX86 )
212224#if defined(__clang__ )
213- #define COMPILER ("[Clang " __clang_version__ "] 32 bit (Intel) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT] ")
225+ #define COMPILER _Py_CLANG_COMPILER(" 32 bit (Intel)")
214226#define PY_SUPPORT_TIER 0
215227#elif defined(__INTEL_COMPILER )
216228#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 32 bit (Intel) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
0 commit comments