Skip to content

Add new bazel_first_party and bazel_third_party features#28975

Open
keith wants to merge 1 commit intobazelbuild:masterfrom
keith:ks/add-new-bazel_first_party-and-bazel_third_party-features
Open

Add new bazel_first_party and bazel_third_party features#28975
keith wants to merge 1 commit intobazelbuild:masterfrom
keith:ks/add-new-bazel_first_party-and-bazel_third_party-features

Conversation

@keith
Copy link
Member

@keith keith commented Mar 12, 2026

This adds 2 new features based on if the code is being compiled as part
of the main repo, or as part of a third party dependency. This allows
users to customize C++ toolchains (or other rules) based on these
features. This can replace some uses of --per_file_copt=external/.*@SOMETHING.

This also allows us to combine features in a way that default toolchain
features can be disabled for third party code. For example you can
disable layering_check for third party code, since you likely don't care
if they correctly define their deps once you're pulling them in.

@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Mar 12, 2026
@bharadwaj08-one
Copy link

@keith Could you please take a look at the failing checks?

@keith keith force-pushed the ks/add-new-bazel_first_party-and-bazel_third_party-features branch 3 times, most recently from 48c1061 to e56887a Compare March 13, 2026 18:43
@iancha1992 iancha1992 added the team-Rules-CPP Issues for C++ rules label Mar 17, 2026
This adds 2 new features based on if the code is being compiled as part
of the main repo, or as part of a third party dependency. This allows
users to customize C++ toolchains (or other rules) based on these
features. This can replace some uses of `--per_file_copt=external/.*@SOMETHING`.

This also allows us to combine features in a way that default toolchain
features can be disabled for third party code. For example you can
disable layering_check for third party code, since you likely don't care
if they correctly define their deps once you're pulling them in.
@keith keith force-pushed the ks/add-new-bazel_first_party-and-bazel_third_party-features branch from e56887a to 6e863a7 Compare March 18, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer team-Rules-CPP Issues for C++ rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants