bazel-contrib / bazel-contrib/toolchains_llvm
Switch to the new C++ toolchains API
- Dominant language
- Starlark
- Stars
- 371
- Forks
- 283
- Avg merge
- 1d 55m
- Merged PRs (30d)
- 25
Description
The new BUILD file based C++ toolchains promise to be much easier to maintain.
https://github.com/bazelbuild/rules_cc/tree/main/examples/rule_based_toolchain
What do you all think about switching over to using those? I'm happy to help.
The example makes it look like we can reuse pieces from `rules_cc`.
```
cc_toolchain(
name = "host_clang",
args = select({
"@platforms//os:linux": [
"//toolchain/args:linux_sysroot",
],
"//conditions:default": [],
}) + [
"//toolchain/args:no_canonical_prefixes",
"//toolchain/args:warnings",
],
enabled_features = ["@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features"],
known_features = ["@rules_cc//cc/toolchains/args:experimental_replace_legacy_action_config_features"],
tool_map = "//toolchain/tools:all_tools",
)
toolchain(
name = "host_cc_toolchain",
toolchain = ":host_clang",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
```
Contributor guide
Research direction
Start with the linked rules_cc examples/rule_based_toolchain example and compare it with the repository’s existing C++ toolchain configuration. The issue names no current files or tests; done would mean agreeing on and completing the migration to the new BUILD-file-based toolchains without regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100