-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Wrong include path to Clang 16 on Windows #17863
Comments
Also hit this. I manually renamed the directory |
Broken by actions/runner-images#812 Unforunately upgrading to LLVM16 per scikit-image/scikit-image#7109 appears to be hampered by bazelbuild/bazel#17863. Working around this, there is a static assertion failure in Google benchmark.
This is required due to actions/runner-images#8125 An assortment of changes to enable building with the LLVM16 toolchain on Windows: - add Windows-2022 back to the test strategy matrix in test.yml. - add an LLVM upgrade step to test.yml to install LLVM 16 - add command to test.yml to fix the include path for LLVM includes (Bazel issue bazelbuild/bazel#17863). - add a macro definition to .bazelrc to prefer __builtin_offsetof (the offsetof macro without this is broken under LLVM16). - add enforced include path override to files including emmintrin.h. clang-cl.exe in LLVM15 picks up the LLVM version of this file, but LLVM16 was picking up the MSFT version and preventing the compiler from replacing intrinsics. It looks like there is a change in precedence between LLVM15 and LLVM16 for the include path setup by Bazel in the INCLUDE environment variable. Test: Install LLVM16, fix the LLVM include directory location for bazel, then run `bazel test //...`
This is required due to actions/runner-images#8125 An assortment of changes to enable building with the LLVM16 toolchain on Windows: - add Windows-2022 back to the test strategy matrix in test.yml. - add an LLVM upgrade step to test.yml to install LLVM 16 - add command to test.yml to fix the include path for LLVM includes (Bazel issue bazelbuild/bazel#17863). - add a macro definition to .bazelrc to prefer __builtin_offsetof (the offsetof macro without this is broken under LLVM16). - add enforced include path override to files including emmintrin.h. clang-cl.exe in LLVM15 picks up the LLVM version of this file, but LLVM16 was picking up the MSFT version and preventing the compiler from replacing intrinsics. It looks like there is a change in precedence between LLVM15 and LLVM16 for the include path setup by Bazel in the INCLUDE environment variable. Test: Install LLVM16, fix the LLVM include directory location for bazel, then run `bazel test //...`
This is required due to actions/runner-images#8125 An assortment of changes to enable building with the LLVM16 toolchain on Windows: - add Windows-2022 back to the test strategy matrix in test.yml. - add an LLVM upgrade step to test.yml to install LLVM 16 - add command to test.yml to fix the include path for LLVM includes (Bazel issue bazelbuild/bazel#17863). - add a macro definition to .bazelrc to prefer __builtin_offsetof (the offsetof macro without this is broken under LLVM16). - add enforced include path override to files including emmintrin.h. clang-cl.exe in LLVM15 picks up the LLVM version of this file, but LLVM16 was picking up the MSFT version and preventing the compiler from replacing intrinsics. It looks like there is a change in precedence between LLVM15 and LLVM16 for the include path setup by Bazel in the INCLUDE environment variable. Test: Install LLVM16, fix the LLVM include directory location for bazel, then run `bazel test //...`
This is required due to actions/runner-images#8125 An assortment of changes to enable building with the LLVM16 toolchain on Windows: - add Windows-2022 back to the test strategy matrix in test.yml. - add an LLVM upgrade step to test.yml to install LLVM 16 - add command to test.yml to fix the include path for LLVM includes (Bazel issue bazelbuild/bazel#17863). - add a macro definition to .bazelrc to prefer __builtin_offsetof (the offsetof macro without this is broken under LLVM16). - add enforced include path override to files including emmintrin.h. clang-cl.exe in LLVM15 picks up the LLVM version of this file, but LLVM16 was picking up the MSFT version and preventing the compiler from replacing intrinsics. It looks like there is a change in precedence between LLVM15 and LLVM16 for the include path setup by Bazel in the INCLUDE environment variable. Test: Install LLVM16, fix the LLVM include directory location for bazel, then run `bazel test //...`
This is a super helpful suggestion, thank you. This got us a long way when trying to workaround the fallout from github's runner image changes (latest fix actions/runner-images#8125). We have a project that includes intrinsics and files with intrinsics need a bit more than the suggest. Simply copying the include path, instead of moving it, to have an One workaround is to add |
This is required due to actions/runner-images#8125 An assortment of changes to enable building with the LLVM16 toolchain on Windows: - add Windows-2022 back to the test strategy matrix in test.yml. - add an LLVM upgrade step to test.yml to install LLVM 16 - add command to test.yml to fix the include path for LLVM includes (Bazel issue bazelbuild/bazel#17863). - add a macro definition to .bazelrc to prefer __builtin_offsetof (the offsetof macro without this is broken under LLVM16). - add enforced include path override to files including emmintrin.h. clang-cl.exe in LLVM15 picks up the LLVM version of this file, but LLVM16 was picking up the MSFT version and preventing the compiler from replacing intrinsics. It looks like there is a change in precedence between LLVM15 and LLVM16 for the include path setup by Bazel in the INCLUDE environment variable. Test: Install LLVM16, fix the LLVM include directory location for bazel, then run `bazel test //...`
This is required due to actions/runner-images#8125 An assortment of changes to enable building with the LLVM16 toolchain on Windows: - add Windows-2022 back to the test strategy matrix in test.yml. - add an LLVM upgrade step to test.yml to install LLVM 16 - add command to test.yml to fix the include path for LLVM includes (Bazel issue bazelbuild/bazel#17863). - add a macro definition to .bazelrc to prefer __builtin_offsetof (the offsetof macro without this is broken under LLVM16). - add enforced include path override to files including emmintrin.h. clang-cl.exe in LLVM15 picks up the LLVM version of this file, but LLVM16 was picking up the MSFT version and preventing the compiler from replacing intrinsics. It looks like there is a change in precedence between LLVM15 and LLVM16 for the include path setup by Bazel in the INCLUDE environment variable. Test: Install LLVM16, fix the LLVM include directory location for bazel, then run `bazel test //...`
This is required due to actions/runner-images#8125 An assortment of changes to enable building with the LLVM16 toolchain on Windows: - add Windows-2022 back to the test strategy matrix in test.yml. - add an LLVM upgrade step to test.yml to install LLVM 16 - add command to test.yml to fix the include path for LLVM includes (Bazel issue bazelbuild/bazel#17863). - add a macro definition to .bazelrc to prefer __builtin_offsetof (the offsetof macro without this is broken under LLVM16). - add enforced include path override to files including emmintrin.h. clang-cl.exe in LLVM15 picks up the LLVM version of this file, but LLVM16 was picking up the MSFT version and preventing the compiler from replacing intrinsics. It looks like there is a change in precedence between LLVM15 and LLVM16 for the include path setup by Bazel in the INCLUDE environment variable. Test: Install LLVM16, fix the LLVM include directory location for bazel, then run `bazel test //...`
Clang install on Windows started using just the major version number in the install path rather than the full version number. Fixes bazelbuild#17863
Fixes an issue with clang-16 on Windows (bazelbuild/bazel#17863), which is now live on the GitHub Actions runners.
@bazel-io flag |
Fixes an issue with clang-16 on Windows (bazelbuild/bazel#17863), which is now live on the GitHub Actions runners.
@bazel-io fork 6.4.0 |
Clang install on Windows started using just the major version number in the install path rather than the full version number. Fixes bazelbuild#17863 Closes bazelbuild#19391. PiperOrigin-RevId: 562480023 Change-Id: Iebd5d3cedff48739747fa8668d56ff8f1d9350b9
Clang install on Windows started using just the major version number in the install path rather than the full version number. Fixes #17863 Closes #19391. Commit 0377bad PiperOrigin-RevId: 562480023 Change-Id: Iebd5d3cedff48739747fa8668d56ff8f1d9350b9 Co-authored-by: Orion Hodson <[email protected]>
Clang install on Windows started using just the major version number in the install path rather than the full version number. Fixes bazelbuild#17863 Closes bazelbuild#19391. Commit bazelbuild@0377bad PiperOrigin-RevId: 562480023 Change-Id: Iebd5d3cedff48739747fa8668d56ff8f1d9350b9 Co-authored-by: Orion Hodson <[email protected]>
A fix for this issue has been included in Bazel 6.4.0 RC1. Please test out the release candidate and report any issues as soon as possible. Thanks! |
The project we have using Clang 16 and Bazel, workerd, builds successfully with a clean Clang 16 installation and Bazel 6.4.0 RC1. Great going, thanks for incorporating the change. Looking forward to dropping the fragile workaround we have in place. 👍🙏 |
Description of the bug:
Building C++ with Clang 16.0.0 and Bazel 6 on Windows spits out "missing dependency declarations" for include files:
The clang lib is installed in
C:/Program Files/LLVM/lib/clang/16
, but Bazel usesclang-cl -v
to detect the version used in the path, which is 16.0.0 here, hence wrongfully using theC:/Program Files/LLVM/lib/clang/16.0.0
path.In
external/local_config_cc/BUILD
:What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Use the following C++ file
With the Bazel config described in https://bazel.build/configure/windows#clang with
--incompatible_enable_cc_toolchain_resolution
.Which operating system are you running Bazel on?
Windows 10
What is the output of
bazel info release
?release 6.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: