Skip to content

Unified: Make Linux build hermetic - #22413

Merged
jketema merged 1 commit into
mainfrom
jketema/swift-static
Aug 24, 2026
Merged

Unified: Make Linux build hermetic#22413
jketema merged 1 commit into
mainfrom
jketema/swift-static

Conversation

@jketema

@jketemajketema commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Tests are expected to fail here, as they depend on internal changes.

@jketema
jketemaforce-pushed the jketema/swift-static branch from b82815a to 0f1fd7fCompareAugust 24, 2026 12:40
@jketemajketema added the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label Aug 24, 2026
@jketema
jketema marked this pull request as ready for review August 24, 2026 13:06
@jketema
jketema requested a review from a team as a code ownerAugust 24, 2026 13:06
CopilotAI balanced review requested due to automatic review settings August 24, 2026 13:06
@jketema
jketema requested review from a team as code ownersAugust 24, 2026 13:06
@jketema
jketema requested a review from redsun82August 24, 2026 13:06

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Makes Linux Swift builds hermetic by supporting an externally supplied static Swift runtime.

Changes:

  • Adds static-runtime constraints and rules_swift integration.
  • Selects static or dynamic runtime linkage by platform.
  • Removes legacy runtime helpers and adjusts packaging.
Show a summary per file
FileDescription
BUILD.bazelDefines the static Swift runtime constraint.
MODULE.bazelMarks Swift toolchain setup as development-only.
unified/BUILD.bazelRemoves runtime libraries from extractor packaging.
unified/extractor/BUILD.bazelUses the unified runtime target as data.
unified/swift-syntax-rs/BUILD.bazelAdds static/dynamic runtime selection and linker grouping.
unified/swift-syntax-rs/swift_runtime.bzlRemoves the legacy runtime-file filter.
unified/swift-syntax-rs/swift_runtime_linking.bzlRemoves the legacy runtime-linking rule.
misc/bazel/registry/modules/rules_swift/4.0.0-rc5-codeql.1/source.jsonRegisters the new rules_swift patch.
misc/bazel/registry/modules/rules_swift/4.0.0-rc5-codeql.1/patches/external_static_runtime.patchAdds external static-runtime support to rules_swift.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment threadunified/BUILD.bazel
"//unified/extractor",
"//unified/swift-syntax-rs:swift_runtime_libs",
],
linux64 = ["//unified/extractor"],

@jketemajketemaAug 24, 2026

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

That's correct and needed when building from this repo (no access to the static libraries).

@jketema
jketema merged commit b3f6f2e into mainAug 24, 2026
81 of 83 checks passed
@jketema
jketema deleted the jketema/swift-static branch August 24, 2026 13:50
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depends on internal PRThis PR should only be merged in sync with an internal Semmle PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jketema@redsun82