Add swift.static_stdlib feature to link Swift runtime statically#1686
Open
mauriciogg wants to merge 7 commits into
Open
Add swift.static_stdlib feature to link Swift runtime statically#1686mauriciogg wants to merge 7 commits into
mauriciogg wants to merge 7 commits into
Conversation
TODO(bazelbuild#8) in swift/toolchains/swift_toolchain.bzl. Introduces SWIFT_FEATURE_STATIC_STDLIB, which, when enabled resolves the standard library and runtime (including swiftrt.o) from the toolchain's `lib/swift_static/{os}` tree instead of the shared `lib/swift/{os}` tree and drops the shared-library rpath
Member
|
I'm definitely for this feature, it would be great if you could add a sh_test in the end that verified that some binary was linked statically |
`native.sh_test` was removed in Bazel 9; load it explicitly from `@rules_shell//shell:sh_test.bzl` (already a dependency in MODULE.bazel at rules_shell 0.3.0) so the CI presubmit can load `test/BUILD`.
56f2cf7 to
a2db436
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.
TODO(#8) in swift/toolchains/swift_toolchain.bzl.
Introduces SWIFT_FEATURE_STATIC_STDLIB, which, when enabled resolves the standard library and runtime (including swiftrt.o) from the toolchain's
lib/swift_static/{os}tree instead of the sharedlib/swift/{os}tree and drops the shared-library rpath