Skip to content

Conversation

@limdor
Copy link
Contributor

@limdor limdor commented Nov 13, 2025

This adds a parameter to unix cc_toolchain_config and windows cc_toolchain_config to be able to inject a cc_feature. This allows a user to inject a feature (for example for custom warnings) without having to reimplement the full toolchain.

Resolves #517

This adds a parameter to unix cc_toolchain_config and windows
cc_toolchain_config to be able to inject a cc_feature.
This allows a user to inject a feature (for example for custom
warnings) without having to reimplement the full toolchain.

Resolves bazelbuild#517
This is required to be able to use it in the unix and windows
toolchains that get generated in a separate repository.
@limdor
Copy link
Contributor Author

limdor commented Nov 13, 2025

I added to 0538f26 to see if the rest of the tests were passing. I believe that this is not wanted but I would ask for advice. The problem we have here is that the bzl file ends up in a generated repository. AFAIK there is no way or it is not a good practice to allow visibility to a specific named repository.

@armandomontanez
Copy link
Collaborator

Re: visibility

I'd expect adding "@local_config_cc/...", should do what you want.

@limdor limdor force-pushed the inject_features_support branch from 9a59372 to eeb2411 Compare November 20, 2025 16:22
@limdor
Copy link
Contributor Author

limdor commented Nov 20, 2025

@armandomontanez it does not work. It does not seem to be allowed to use the @ notation

Error in visibility: invalid package name '@local_config_cc//...': must start with '//' or be 'public' or 'private'

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for injecting custom toolchain features

2 participants