Repository navigation
Description
Summary
Move C/C++ tool selection closer to Rule Based Toolchains (RBT) by mapping tools provided by tool packages to the actions that use them through the rules_cc toolchain API.
Today, the generated toolchain configuration binds package tools directly to Bazel action_config entries. This Epic will introduce the mapping needed to express those associations through the RBT API and use it consistently across supported toolchains.
Motivation
Tool executables are supplied by packages, while the toolchain configuration determines which executable runs for each action. Keeping that association in generated action_config wiring makes tool selection less declarative and makes further RBT adoption harder.
A package-to-action mapping will make the relationship explicit, reduce tool-specific wiring in the configuration template, and provide a consistent basis for supporting different tool packages and platforms.
Scope
- Define how tools exposed by a package are associated with the relevant C/C++ action types using the
rules_cctoolchain API. - Update toolchain generation and configuration to consume those associations instead of hardcoding package tool attributes into action configurations.
- Cover the existing action-to-tool associations, including assembly, C/C++ compilation, linking, static-library creation, and stripping.
- Preserve existing action behavior, including action-specific flags and implications.
- Migrate and verify the supported package and platform configurations.
- Document how package maintainers declare or update tool mappings.
Acceptance criteria
- Tool-to-action associations are defined explicitly and consumed through the RBT API.
- Existing supported tool packages select the same executable for each action as before the migration.
- All currently supported compile, assemble, link, archive, and strip actions remain correctly configured.
- Existing action-specific behavior is preserved.
- Tests or build validation demonstrate that supported toolchain configurations resolve and invoke the mapped tools correctly.
- The relevant toolchain and package documentation is updated.
- The migration does not introduce an unintended dependency on legacy tool paths for actions handled by the new mapping.
Reference
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsDone
Activity
nradakovic commentedon Nov 12, 2026
This EPIC will be dropped in favor of Ruled Based Toolchains.