Set USE_CLANG_CL=1 to force substitute llvm tools#88
Merged
lizan merged 7 commits intoenvoyproxy:masterfrom Aug 21, 2020
greenhouse-org:clang-cl-add-env-var
Merged
Set USE_CLANG_CL=1 to force substitute llvm tools#88lizan merged 7 commits intoenvoyproxy:masterfrom greenhouse-org:clang-cl-add-env-var
lizan merged 7 commits intoenvoyproxy:masterfrom
greenhouse-org:clang-cl-add-env-var
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 <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com> Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
Member
Author
|
cc @wrowe |
Member
Author
|
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 <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com>
Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Signed-off-by: William A Rowe Jr <wrowe@vmware.com>
Member
Author
|
See bazelbuild/bazel-toolchains#904 which should fix the print format args issue |
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
Member
Author
|
@lizan this should be ready to go when you get a chance |
lizan
approved these changes
Aug 21, 2020
Member
Author
|
@lizan merged master, this should be ready again |
htuch
pushed a commit
that referenced
this pull request
Aug 21, 2020
[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 <sunjayb@vmware.com> Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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