bazel-contrib / bazel-contrib/toolchains_llvm
Generate the `toolchain` rules in a single separate package so users can use the `:all` target pattern when registering them
- Dominant language
- Starlark
- Stars
- 371
- Forks
- 283
- Avg merge
- 1d 55m
- Merged PRs (30d)
- 25
Description
[`local_config_cc_toolchains` does this](https://github.com/bazelbuild/bazel/blob/584514771f245855232d412e77ed68d931476bae/tools/cpp/cc_configure.bzl#L185-L186) (toolchains are defined [here](https://github.com/bazelbuild/bazel/blob/584514771f245855232d412e77ed68d931476bae/tools/osx/crosstool/BUILD.toolchains) and [here](https://github.com/bazelbuild/bazel/blob/584514771f245855232d412e77ed68d931476bae/tools/cpp/BUILD.toolchains.tpl)).
This is desirable because it makes it possible to just use `@llvm_toolchain//toolchains:all` (for example) when using this toolchain with a toolchain transition that sets `--extra_toolchains` rather than meticulously maintaining a `select` call that matches the toolchains that this repo emits for each platform/configuration.
We should also update the blurb in the readme that mentions using `--extra_toolchains=...` to match once we do this.
(this isn't high-priority; just something I ran into while trying to put together a proof of concept for #130)
Contributor guide
Research direction
Start by reading the referenced local_config_cc_toolchains implementation, tools/osx/crosstool/BUILD.toolchains, and tools/cpp/BUILD.toolchains.tpl. Trace how this repository emits toolchain rules for each platform or configuration, then update the README guidance mentioned in the issue. Done means users can register the generated rules through a single :all target pattern.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100