[Bazel] Replace uses of deprecated bazel_tools things#1682
Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom Mar 24, 2026
Merged
[Bazel] Replace uses of deprecated bazel_tools things#1682sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100 merged 1 commit intoemscripten-core:mainfrom
Conversation
sbc100
reviewed
Feb 26, 2026
a2e4fcb to
1ac99d2
Compare
sbc100
approved these changes
Feb 26, 2026
Contributor
Author
|
I believe the test failure here was just a flake, it seems the download of a Baze module failed somehow. |
All C++ infrastructure should come from @rules_cc now.
auto-merge was automatically disabled
March 24, 2026 09:27
Head branch was pushed to by a user without write access
1ac99d2 to
590fbad
Compare
sbc100
pushed a commit
that referenced
this pull request
Mar 24, 2026
…1683) This is a followup of #1682. This has been deprecated and will be removed in Bazel 10. This implementation of the platform information retrieval is similar to what is done in Skylib (see https://github.com/bazelbuild/bazel-skylib/blob/56a2abbaf131332835ab2721a258ea3c763a7178/rules/private/copy_file_private.bzl#L117) however this does not use the experimental platform API. - We define a provider that gives the script extension for a given platform and a rule to instantiate it. - We define a target with the `platform_info` rule that selects the correct settings based on constraints from `@platform`. - During toolchain config creation we inject that target **using the `exec` config**. - We can then retrieve the platform information in the toolchain config (namely the script extension here). Note that the platform information could have given a simple `is_windows` flag, but I chose this implementation because it matches the previous one more closely. Note also that it was not possible to keep the `script_extension` attribute as string, because the `cfg` field is not supported on string attributes.
DoDoENT
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using the C++ rules, libraries and utilities from bazel_tools is being deprecated in favor of using rules_cc.
Similarly the@bazel_tools//src/conditions:host_windowsconstraint has been deprecated for a while and will be removed with Bazel 10.