Skip to content

Add C/C++ tool mapping (RBT) for action configs #158

Closed as not planned
Closed as not planned

Description

@nradakovic

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_cc toolchain 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

Activity

  1. added theissue type on Sep 29, 2026
  2. added
    refinement needed
    on Sep 29, 2026
  3. added
    documentation
    feature
    action config
    p3
    and removed
    refinement needed
    on Oct 7, 2026
  4. nradakovic commented on Nov 12, 2026

    @nradakovic
    MemberAuthor

    This EPIC will be dropped in favor of Ruled Based Toolchains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    action configdocumentationfeaturep3

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions