summaryrefslogtreecommitdiffstats
path: root/PC/launcher2.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2023-01-27 14:45:08 (GMT)
committerGitHub <noreply@github.com>2023-01-27 14:45:08 (GMT)
commit737d367b1f4bad76914173a64d6bbe19a984cd5f (patch)
treefc15b2c1c3dad1d49acd95304a0b1a85a1862388 /PC/launcher2.c
parent7956e0c30001cc0940caa66fab4d72455c865b3a (diff)
downloadcpython-737d367b1f4bad76914173a64d6bbe19a984cd5f.zip
cpython-737d367b1f4bad76914173a64d6bbe19a984cd5f.tar.gz
cpython-737d367b1f4bad76914173a64d6bbe19a984cd5f.tar.bz2
gh-77532: Minor tweaks to allow compiling with PlatformToolset=ClangCL on Windows (GH-101352)
To use this, ensure that clang support was selected in Visual Studio Installer, then set the PlatformToolset environment variable to "ClangCL" and build as normal from the command line. It remains unsupported, but at least is possible now for experimentation.
Diffstat (limited to 'PC/launcher2.c')
-rw-r--r--PC/launcher2.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/PC/launcher2.c b/PC/launcher2.c
index 4c77ec0..2052a2f 100644
--- a/PC/launcher2.c
+++ b/PC/launcher2.c
@@ -465,10 +465,14 @@ dumpSearchInfo(SearchInfo *search)
return;
}
-#define DEBUGNAME(s) L"SearchInfo." ## s
-#define DEBUG(s) debug(DEBUGNAME(#s) L": %s\n", (search->s) ? (search->s) : L"(null)")
-#define DEBUG_2(s, sl) _debugStringAndLength((search->s), (search->sl), DEBUGNAME(#s))
-#define DEBUG_BOOL(s) debug(DEBUGNAME(#s) L": %s\n", (search->s) ? L"True" : L"False")
+#ifdef __clang__
+#define DEBUGNAME(s) L # s
+#else
+#define DEBUGNAME(s) # s
+#endif
+#define DEBUG(s) debug(L"SearchInfo." DEBUGNAME(s) L": %s\n", (search->s) ? (search->s) : L"(null)")
+#define DEBUG_2(s, sl) _debugStringAndLength((search->s), (search->sl), L"SearchInfo." DEBUGNAME(s))
+#define DEBUG_BOOL(s) debug(L"SearchInfo." DEBUGNAME(s) L": %s\n", (search->s) ? L"True" : L"False")
DEBUG(originalCmdLine);
DEBUG(restOfCmdLine);
DEBUG(executablePath);