-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set USE_CLANG_CL=1 to force substitute llvm tools #88
Conversation
It seems bazel-toolchains does not as of yet let us choose the actual compiler we are targeting so the cc-compiler-x64_windows always points to msvc-cl while on Linux, cc-compiler-k8 points to the correct compiler (gcc or clang etc.). With this change, we are in fact still using the compiler named msvc-cl but the toolchain config points to llvm tools rather than MSVC tools. The MSVC cl.exe and link.exe command syntax is what is common. We may be able to undo this if either Bazel itself is able to change its CC toolchain rules for Windows to match the better Linux pattern (and do away with the USE_CLANG_CL logic) or bazel-toolchains has a good way of specifying a target cpu and compiler (so we can for example specify x64_windows and clang-cl or x64_windows and msvc-cl to get the correct toolchain). Signed-off-by: Sunjay Bhatia <[email protected]> Signed-off-by: William A Rowe Jr <[email protected]> Co-authored-by: Sunjay Bhatia <[email protected]> Co-authored-by: William A Rowe Jr <[email protected]>
cc @wrowe |
One theory we have as to why the windows toolchain generation is failing like this is this change: actions/runner-images@95222e0#diff-580bd0ec6b5a6590106c72db0501d8f0 that enabled Windows Subsystem for Linux on the AZP workers, it might be that the |
Co-authored-by: Sunjay Bhatia <[email protected]> Signed-off-by: William A Rowe Jr <[email protected]>
Co-authored-by: Sunjay Bhatia <[email protected]> Signed-off-by: Sunjay Bhatia <[email protected]> Signed-off-by: William A Rowe Jr <[email protected]>
See bazelbuild/bazel-toolchains#904 which should fix the print format args issue |
Signed-off-by: Sunjay Bhatia <[email protected]> Co-authored-by: William A Rowe Jr <[email protected]>
@lizan this should be ready to go when you get a chance |
@lizan merged master, this should be ready again |
[skip ci] Set USE_CLANG_CL=1 to force substitute llvm tools (#88) It seems bazel-toolchains does not as of yet let us choose the actual compiler we are targeting so the cc-compiler-x64_windows always points to msvc-cl while on Linux, cc-compiler-k8 points to the correct compiler (gcc or clang etc.). With this change, we are in fact still using the compiler named msvc-cl but the toolchain config points to llvm tools rather than MSVC tools. The MSVC cl.exe and link.exe command syntax is what is common. We may be able to undo this if either Bazel itself is able to change its CC toolchain rules for Windows to match the better Linux pattern (and do away with the USE_CLANG_CL logic) or bazel-toolchains has a good way of specifying a target cpu and compiler (so we can for example specify x64_windows and clang-cl or x64_windows and msvc-cl to get the correct toolchain). Signed-off-by: Sunjay Bhatia <[email protected]> Co-authored-by: William A Rowe Jr <[email protected]>
It seems bazel-toolchains does not as of yet let us choose the actual
compiler we are targeting so the cc-compiler-x64_windows always points
to msvc-cl while on Linux, cc-compiler-k8 points to the correct compiler
(gcc or clang etc.).
With this change, we are in fact still using the compiler named msvc-cl
but the toolchain config points to llvm tools rather than MSVC tools.
The MSVC cl.exe and link.exe command syntax is what is common.
We may be able to undo this in the future if either Bazel itself is able to change its
CC toolchain rules for Windows to match the better Linux pattern (and do
away with the USE_CLANG_CL logic) or bazel-toolchains has a good way of
specifying a target cpu and compiler (so we can for example specify
x64_windows and clang-cl or x64_windows and msvc-cl to get the correct
toolchain).
See bazelbuild/bazel-toolchains#901 for a conversation
started with the bazel-toolchains maintainers.
Also bumps bazel-toolchains dependency to pick up changes from: bazelbuild/bazel-toolchains#904