Skip to content

Commit c3b8d73

Browse files
authored
GH-131473: Override PreferredToolArchitecture when using Visual Studio bundled clang-cl (GH-131689)
tweak PreferredToolArchitecture for bundled clang-cl
1 parent 97ab8fc commit c3b8d73

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

PCbuild/python.props

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@
1919
<ICCBuild>false</ICCBuild>
2020
<ICCBuild Condition="$(PlatformToolset.StartsWith(`Intel C++ Compiler`))">true</ICCBuild>
2121

22+
<!--
23+
This ensures, that in case of clang-cl bundled with VS
24+
we find e.g. clang_rt.profile.lib in the correct bitness.
25+
In case the user sets LLVMInstallDir and LLVMToolsVersion,
26+
they are responsible to use the correct tool architecture.
27+
For details please see GH-131473.
28+
-->
29+
<PreferredToolArchitecture Condition="$(LLVMInstallDir) == '' and $(PlatformToolset) == 'ClangCL' and $(Platform) == 'x64'">x64</PreferredToolArchitecture>
30+
<PreferredToolArchitecture Condition="$(LLVMInstallDir) == '' and $(PlatformToolset) == 'ClangCL' and $(Platform) == 'Win32'">x86</PreferredToolArchitecture>
31+
2232
<!--
2333
Convincing MSVC/MSBuild to prefer our platform names is too difficult,
2434
so we define our own constant ArchName and use wherever we need it.

0 commit comments

Comments
 (0)