Skip to content

Add feature injection - #52

Merged
nradakovic merged 1 commit into
mainfrom
nira_add_feature_injection
Jul 21, 2026
Merged

Add feature injection#52
nradakovic merged 1 commit into
mainfrom
nira_add_feature_injection

Conversation

@nradakovic

@nradakovic nradakovic commented Apr 15, 2026

Copy link
Copy Markdown
Member

Add feature injection to toolchain gcc extension. This option will allow users to add external defined features.

resolves #45

@nradakovic nradakovic self-assigned this Apr 15, 2026
@nradakovic nradakovic added feature New feature request wip Work in progress example Add or update examples template Add or update template toolchain configurations p3 Medium/Low - handle it within normal process labels Apr 15, 2026
@nradakovic
nradakovic marked this pull request as ready for review April 29, 2026 08:32
@nradakovic
nradakovic force-pushed the nira_add_feature_injection branch 2 times, most recently from 36afac3 to c78d5e9 Compare June 23, 2026 09:56
@nradakovic
nradakovic requested a review from Copilot July 1, 2026 08:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds “feature injection” plumbing to GCC toolchain configuration so consumers can supply external cc_feature-based features (via FeatureInfo) and have them appended to the generated toolchain config.

Changes:

  • Add extra_enabled_features / extra_known_features attributes to the Linux and QNX cc_toolchain_config templates and extend the toolchain features list via convert_feature(...).
  • Thread the new attributes through the GCC module extension/repository rule generation (plus a small helper to stringify label lists).
  • Update the examples to a newer rules_cc version and disable/remove sanitizer-related example tests.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
templates/qnx/cc_toolchain_config.bzl.template Adds support for injecting external cc_feature features into the QNX toolchain config.
templates/linux/cc_toolchain_config.bzl.template Adds feature injection loading + wiring, and removes previously inlined features (sanitizers/gnu11).
rules/gcc.bzl Threads injected-feature labels into the generated Linux cc_toolchain_config(...) call.
rules/common.bzl Adds label_list_to_string() helper used by rules/gcc.bzl.
extensions/gcc.bzl Exposes injected-feature label lists on the module extension toolchain tag API.
examples/MODULE.bazel Bumps rules_cc version used by the examples.
examples/MODULE.bazel.lock Lockfile updates corresponding to the examples’ dependency bump and tag schema changes.
examples/BUILD Comments out sanitizer-related example tests.
examples/tsan_test.cpp Removes the TSAN repro test source.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread templates/qnx/cc_toolchain_config.bzl.template
Comment thread extensions/gcc.bzl
Comment thread extensions/gcc.bzl
Comment thread rules/gcc.bzl
Comment thread templates/linux/cc_toolchain_config.bzl.template
Comment thread templates/linux/cc_toolchain_config.bzl.template

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 16 changed files in this pull request and generated 5 comments.

Comment thread templates/linux/cc_toolchain_config.bzl.template
Comment thread templates/qnx/cc_toolchain_config.bzl.template
Comment thread rules/common.bzl Outdated
Comment thread docs/examples_and_validation.md Outdated
Comment thread examples/README.md Outdated
@nradakovic
nradakovic force-pushed the nira_add_feature_injection branch 4 times, most recently from 2c1935b to cfacf51 Compare July 21, 2026 11:51
Add feature injection to toolchain gcc extension. This option will
allow users to add external defined features.
@nradakovic
nradakovic force-pushed the nira_add_feature_injection branch from cfacf51 to f7cb2ab Compare July 21, 2026 11:53
@nradakovic nradakovic removed the wip Work in progress label Jul 21, 2026
@nradakovic
nradakovic merged commit 0c4b466 into main Jul 21, 2026
16 of 18 checks passed
@nradakovic
nradakovic deleted the nira_add_feature_injection branch July 21, 2026 13:36
@github-project-automation github-project-automation Bot moved this from In Progress to Done in INF - Infrastructure Community Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

example Add or update examples feature New feature request p3 Medium/Low - handle it within normal process template Add or update template toolchain configurations

Projects

Development

Successfully merging this pull request may close these issues.

Add external feature injection to GCC toolchain (like toolchains_llvm extra_known_features)

3 participants