Skip to content

Conversation

@fmeum
Copy link
Member

@fmeum fmeum commented Oct 5, 2025

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

  • go_proto_library, nogo, and stdlib may use cgo and thus need the relevant attributes to detect the availability of a C++ toolchain.
  • All rules should continue to use a pure build if the pure flag is turned off or the toolchain turns off cgo via a constraint.

Which issues(s) does this PR fix?

Fixes #4447

Other notes for review

@fmeum fmeum force-pushed the add_cgo branch 2 times, most recently from 3594db0 to 7b59c4d Compare October 21, 2025 16:53
@fmeum fmeum changed the title Fix pure mode detection for special rules Fix pure mode detection Oct 22, 2025
@fmeum fmeum requested a review from jayconrod October 23, 2025 10:16
@fmeum
Copy link
Member Author

fmeum commented Oct 23, 2025

@jayconrod Looks like my latest change fixes the bug as per #4447 (comment). I haven't been able to produce a test for this, the one I added also passes on master. I'm inclined to merge this anyway and add a test later if someone manages to create a reproducer.

`go_proto_library`, `nogo`, and `stdlib` may use cgo and thus need the relevant attributes to detect the availability of a C++ toolchain.
@fmeum fmeum enabled auto-merge (squash) October 23, 2025 18:06
@fmeum fmeum merged commit e9352e9 into master Oct 23, 2025
4 checks passed
@fmeum fmeum deleted the add_cgo branch October 23, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: mixed pure/non‑pure modes across deps after PR-4439 causes archive mode mismatch when using --host_platform bazel flag

3 participants