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

Move toolchain registration into WORKSPACE #5070

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

sluongng
Copy link
Contributor

@sluongng sluongng commented Oct 20, 2023

Register our toolchains inside WORKSPACE.
Then enable automatic cc toolchain resolution for auto selection based
on platform compatibility.

This let us get rid of the manual toolchain declaration when building with
--config=remote. Subsequently, we won't need to specify --cpu and
--host_cpu to aid cc_toolchain_suite detection.

@sluongng sluongng force-pushed the sluongng/toolchain-registration branch from 33b3d1e to 47314dd Compare October 20, 2023 12:59
@sluongng sluongng changed the title sluongng/toolchain registration Move toolchain registration into WORKSPACE Oct 20, 2023
@sluongng sluongng force-pushed the sluongng/toolchain-registration branch from 47314dd to 19a0c99 Compare October 20, 2023 13:06
Register our toolchains inside WORKSPACE.
Then enable automatic cc toolchain resolution for auto selection based
on platform compatibility.
@sluongng sluongng force-pushed the sluongng/toolchain-registration branch from 19a0c99 to cd4e52f Compare October 20, 2023 13:15
@sluongng sluongng requested a review from bduffany October 20, 2023 13:23
@sluongng
Copy link
Contributor Author

The expected outcome here is from a MacOS laptop, you should be able to just do bazel build --config=remote //... and it will switch to the correct toolchain, correct setup etc...

Copy link
Member

@bduffany bduffany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but it may be good to have @tempoz or @siggisim take another look, since I don't have a lot of experience with toolchains.

@sluongng
Copy link
Contributor Author

@tempoz I will let you decide whether to merge this PR or #4962 first.

I don't mind rebasing on top of your PR if it lands before this one, or to help rebase your PR if mine landed first.

@sluongng sluongng merged commit 8073210 into master Oct 23, 2023
2 checks passed
@sluongng sluongng deleted the sluongng/toolchain-registration branch October 23, 2023 15:32
sluongng added a commit that referenced this pull request Oct 23, 2023
This reverts commit 8073210.

Need to update internal repo before re-merging this PR
sluongng added a commit that referenced this pull request Oct 23, 2023
This reverts commit 1647371.

We previously introduced this in 5070 but reverted due to
incompatibilities with internal repo. Will couple this PR with another
internal PR to ensure compatibility between the 2.
sluongng added a commit that referenced this pull request Oct 27, 2023
This reverts commit 1647371.

We previously introduced this in 5070 but reverted due to
incompatibilities with internal repo. Will couple this PR with another
internal PR to ensure compatibility between the 2.
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.

3 participants