* Add support for `layering_check`
The general support for this feature is inherited from the
Bazel-provided Unix C++ toolchain, except that a module map for the
toolchain and sysroot headers has to be supplied to the `cc_toolchain`.
Requires an update of abseil-cpp to make it compatible with
`layering_check`. Some other deps also needed to be updated.
Also fixes some nits related to Bazel 7 upgrade.
By exposing all includes it is possible for users of this toolchain to build clang-tidy plugins compatible with the toolchain's clang-tidy binary, using the `-load=` option of clang-tidy.
Updates to 16.0.0 as default, 16.0.5 for Apple Silicon, but keeps 15.0.7 for x86 Apple.
Bonus changes:
- Include libtinfo5 in test envs
- New include dirs format as lib/clang/16/include/
* Add 15.0.2 support
* Fixes for linux OSes with empty lines in /etc/os-release
---------
Co-authored-by: Steven Casagrande <steven.casagrande@ibm.com>
- Prepare for BCR release as 0.10.0
- Rename repo name to toolchains_llvm
- Upgrade Go version in tests and remove -nopie flag
- Combine lint and tests workflow
For reasons unknown, rules_go linkages are happening with PIC forced,
but abseil is not.
We can re-enable external tests on LLVM 15 by explicitly saying `-nopie`
to the linker. However, abseil builds will complain about the flag.
Configures buildifier to run with a config obtained from removing
docstring and 'sorted items in dict' warnings from the example config.
```
.trunk/tools/buildifier -config=example
```
This is a fairly straightforward change that adds support for using `bazel-toolchain` with `bzlmod`.
The `llvm.toolchain` extension is only a wrapper around the existing `llvm_toolchain` repository rule and supports the same attributes.
For trying it out, add the following to your `MODULE.bazel`:
```
bazel_dep(name = "com_grail_bazel_toolchain", version = "0.8")
git_override(module_name = "com_grail_bazel_toolchain", remote = "https://github.com/grailbio/bazel-toolchain", commit = "cf915e5c7cfcd19a3e71de54e385e01240b865dc")
llvm = use_extension("@com_grail_bazel_toolchain//toolchain:extensions.bzl", "llvm")
llvm.toolchain(
llvm_version = "15.0.0"
)
use_repo(llvm, "llvm_toolchain")
register_toolchains("@llvm_toolchain//:all")
```
---------
Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Co-authored-by: Gabriel Féron <g@leirbagl.net>