Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependency on cpp toolchain to rules that also depend on cgo_context_data #4128

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jesses-canva
Copy link

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

This diff fixes the below issue by adding a cpp toolchain dependency to all the rules that depend on cgo_context_data, so they also have their execution platform constrained to the platforms compatible with the selected cpp toolchain.

Which issues(s) does this PR fix?

Fixes #4127

Other notes for review

A more ideal fix for this problem would be to turn cgo_context_data into a toolchain, however that would be a bigger diff.

…n platform as the selected cpp toolchain by adding a direct optional dependency on the cpp toolchain
@fmeum
Copy link
Member

fmeum commented Oct 2, 2024

This is a change that I have wanted to make for a long time, thanks for sending it!

I would be in favor of obtaining cgo_context_info from the toolchain directly, even if that results in a larger diff. I think that it will make the user-visible parts of this change less confusing by not mixing toolchains in different configurations (that of the context dep and that of the current target).

@jesses-canva
Copy link
Author

@fmeum Yep that would also work, I don't think I will be able to spend any more time on this for a while though.

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.

Go rules run cpp toolchain from cgo_context_data on an incompatible execution platform
2 participants