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

vendor large parts of @bazel_tools//tools/cpp #622

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

malt3
Copy link
Collaborator

@malt3 malt3 commented Nov 29, 2024

Most of @bazel_tools//tools/cpp was removed from @bazel_tools and moved into a private package in rules_cc in Bazel 8.

It looks like some parameters of cc_toolchain_config where added over the years and are not available in all versions of Bazel.
I ended up doing some clever version checks when selecting the right version of unix_cc_toolchain_config.bzl.

Fixes #612

@malt3 malt3 force-pushed the mp/cc_toolchain_vendoring branch 4 times, most recently from c3d4c63 to 44b2669 Compare November 29, 2024 22:45
…e//private/cc_toolchain

Most of @bazel_tools//tools/cpp was removed from @bazel_tools and moved into a private package in rules_cc in Bazel 8.
This is only available in Bazel 8 and later.
See bazelbuild/bazel#9e913fbfa2e3930742fc30dfb60ac5e2694c70cf
This is only available in Bazel 7 and later.
See bazelbuild/bazel#b272cef7d4b2d1be4e3f82b737c3c14d5e768aea
…les_cc

Bazel 7 and prior requires a matching unix_cc_toolchain_config
(with the appropriate features for that Bazel version).
That one is bound to the Bazel version and can be loaded from
@bazel_tools up to Bazel 8, where it was moved to rules_cc.
@malt3 malt3 force-pushed the mp/cc_toolchain_vendoring branch from 8464597 to 07e23e1 Compare December 17, 2024 18:37
@malt3 malt3 marked this pull request as ready for review December 17, 2024 19:18
@malt3 malt3 requested a review from a team as a code owner December 17, 2024 19:18
Copy link
Contributor

@tshaynik tshaynik left a comment

Choose a reason for hiding this comment

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

Looks great!

@malt3 malt3 added the merge-queue merge on green CI label Dec 18, 2024
@mergify mergify bot merged commit 4b193df into master Dec 18, 2024
13 checks passed
@mergify mergify bot deleted the mp/cc_toolchain_vendoring branch December 18, 2024 05:40
@mergify mergify bot removed the merge-queue merge on green CI label Dec 18, 2024
@kczulko
Copy link
Contributor

kczulko commented Dec 18, 2024

@malt3
Thank you for this! Do you plan to drop a BCR release soon?

Regards,
Karol

@malt3
Copy link
Collaborator Author

malt3 commented Dec 18, 2024

@kczulko we do! If possible, we'd like to fix #623 first. Any Nix + macOS sdk knowledge would help us there.

@kczulko
Copy link
Contributor

kczulko commented Dec 18, 2024

Thx, got it. Sorry but I'm a core x86_64-linux user.

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.

almost all of @bazel_tools//tools/cpp may not exist for [email protected]
3 participants