Skip to content

Replace hardcoded -g0 with toolchain features#29048

Open
keith wants to merge 1 commit into
bazelbuild:masterfrom
keith:ks/replace-hardcoded-g0-with-toolchain-features
Open

Replace hardcoded -g0 with toolchain features#29048
keith wants to merge 1 commit into
bazelbuild:masterfrom
keith:ks/replace-hardcoded-g0-with-toolchain-features

Conversation

@keith

@keith keith commented Mar 22, 2026

Copy link
Copy Markdown
Member

Must be paired with a rules_cc version bump that includes bazelbuild/rules_cc#649

Fixes #13308
Fixes #24545

RELNOTES[inc]: Remove default -g0 for host tools. This is still added with the default CC toolchains or if you don't set no_legacy_features

Must be paired with a rules_cc version bump that includes bazelbuild/rules_cc#649

Fixes bazelbuild#13308
Fixes bazelbuild#24545
@keith

keith commented Mar 22, 2026

Copy link
Copy Markdown
Member Author

cc @gregestren

@iancha1992 iancha1992 added the team-Rules-CPP Issues for C++ rules label Mar 23, 2026
@gregestren gregestren self-requested a review March 25, 2026 15:35
@gregestren

Copy link
Copy Markdown
Contributor

Nice simplification!

Must be paired with a rules_cc version bump that includes bazelbuild/rules_cc#649

What's the right merge sequence? Given that presubmit CI isn't failing, Bazel's core CI doesn't cover this?

@keith

keith commented Mar 25, 2026

Copy link
Copy Markdown
Member Author

yea ideally we would merge the rules_cc change, create a release, and then i would pull that release bump into this change.

i think the risk of merging them out of sync is actually that internal google toolchains are expecting this and don't get it. because the default public toolchains default to having this for opt, so only folks who override the opt flags wouldn't get this behavior.

@gregestren

Copy link
Copy Markdown
Contributor

Okay, we can put this into the internal merge queue and see what happens?

@gregestren gregestren added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Mar 27, 2026
@keith

keith commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

@gregestren how'd this one go

@gregestren

Copy link
Copy Markdown
Contributor

I just wanted to double-check with @trybka for merging . Re-pinged.

@gregestren

Copy link
Copy Markdown
Contributor

Googlers are discussing some proprietary toolchain issues. I'm trying to track that but I think in a worst case we could fork Google's exec configuration to keep -g0 without making that a Bazel-wide problem.

@trybka

trybka commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Yeah, we tried to import bazelbuild/rules_cc#649 and ran into issues, trying to sort those out.

Landing this will also require either an exec config fork in the interim or other toolchain additions (i.e. setting -g0 in exec). But doing so would require landing rules_cc PR#649 first.

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

Labels

awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally team-Rules-CPP Issues for C++ rules

Projects

None yet

4 participants