Fix incorrect compiler type with USE_CLANG_CL on windows. - #858
Fix incorrect compiler type with USE_CLANG_CL on windows.#858UebelAndre wants to merge 2 commits into
USE_CLANG_CL on windows.#858Conversation
|
CI will need an approval. |
| name = "msvc_x64", | ||
| cpu = "x64_windows", | ||
| compiler = "msvc-cl", | ||
| compiler = "%{msvc_compiler_x64}", |
There was a problem hiding this comment.
possibly naive question: what is the point of the arch suffix on these template variables?
AFAICT this is only ever set to msvc-cl or clang-cl based on the repo_env.
Additionally since one possible value is "clang-cl" can this just be "%{compiler}"?
There was a problem hiding this comment.
I was mostly trying to follow the current precedent by the other template variables which are arch specific for the naming but since the compiler is common I chose an arbitrary one. Refactored this to use %{compiler} and operate outside of the cpu branches.
| // clang-cl while it still declares itself msvc-cl. | ||
| #if defined(_MSC_VER) | ||
| #if defined(__clang__) | ||
| static_assert(StrEq(kDeclaredCompiler, "clang-cl"), |
There was a problem hiding this comment.
could this be an issue with how clang versions binaries with like clang-21?
There was a problem hiding this comment.
I relaxed this, let me know what you think!
This change affects the auto configured toolchains which was setting the incorrect toolchain type when
--repo_env=USE_CLANG_CL=1is set.