Bazel: Update to latest rules_cc, rules_swift, and apple_support - #22325
Open
jketema wants to merge 2 commits into
Open
Bazel: Update to latest rules_cc, rules_swift, and apple_support#22325jketema wants to merge 2 commits into
rules_cc, rules_swift, and apple_support#22325jketema wants to merge 2 commits into
Conversation
jketema
force-pushed
the
jketema/update-bazel-deps
branch
from
August 12, 2026 12:21
0134a2a to
09272d5
Compare
Note that `rules_swift` requires the versions of `apple_support` and `rules_cc` we're updating to. Also update the Swift version we use in the build to 6.3.3, which is supported out-of-the-box by the new `rules_swift` version.
jketema
force-pushed
the
jketema/update-bazel-deps
branch
from
August 12, 2026 12:31
09272d5 to
8080619
Compare
jketema
marked this pull request as ready for review
August 12, 2026 13:22
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Bazel’s Swift/C++ dependencies and Swift toolchain while adapting runtime linking for the upgraded rules.
Changes:
- Upgrades
rules_cc,rules_swift,apple_support, and Swift 6.3.3. - Adds explicit Swift dynamic-runtime linking.
- Disables an incompatible linker workaround on standalone Linux builds.
Show a summary per file
| File | Description |
|---|---|
.bazelrc |
Configures the Linux linker workaround. |
MODULE.bazel |
Updates Bazel dependencies and Swift version. |
unified/swift-syntax-rs/.swift-version |
Pins Swift 6.3.3. |
unified/swift-syntax-rs/BUILD.bazel |
Integrates Swift runtime linking. |
unified/swift-syntax-rs/README.md |
Documents the updated Swift version. |
unified/swift-syntax-rs/swift_runtime_linking.bzl |
Exposes runtime linking information. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Balanced
| build --repo_env=CC=clang --repo_env=CXX=clang++ | ||
| # The standalone Linux toolchain uses gold, which does not support the | ||
| # LLD-specific -z nostart-stop-gc workaround enabled by rules_swift. | ||
| build:linux --features=-swift.lld_gc_workaround |
Contributor
Author
There was a problem hiding this comment.
We don't use Gold when building from the internal repo, so this is fine.
| load("@rules_swift//swift:swift.bzl", "swift_common") | ||
|
|
||
| def _swift_runtime_linking_impl(ctx): | ||
| return [swift_common.get_toolchain(ctx).dynamic_runtime_cc_info] |
Contributor
Author
There was a problem hiding this comment.
That actually breaks things if the conditionals are removed at the place where this us used. Handled this slightly differently.
jketema
force-pushed
the
jketema/update-bazel-deps
branch
from
August 12, 2026 13:54
639d53e to
7d4724a
Compare
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.
Note that
rules_swiftrequires the versions ofapple_supportandrules_ccwe're updating to.Also update the Swift version we use in the build to 6.3.3, which is supported out-of-the-box by the new
rules_swiftversion.Windows tests are expected to fail here; resolved internally.