-
Notifications
You must be signed in to change notification settings - Fork 1.4k
enable static linking of the swift runtime libraries by default on supported platforms #3905
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
base: main
Are you sure you want to change the base?
Conversation
@neonichu @abertelrud @ktoso @weissi @compnerd @MaxDesiatov following on the discussion from https://forums.swift.org/t/pre-pitch-statically-linking-the-swift-runtime-libraries-by-default-on-linux/ this is a draft implementation. does this resonate with you? if so, I will make a formal pitch with a link to this PR as the impl |
89f8989
to
cb4a28b
Compare
0e90fd4
to
45d8915
Compare
let testPathExtension = testBuildDescription.binary.extension | ||
XCTAssertEqual(testPathExtension, "wasm") | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaxDesiatov one of the key pieces of feedback to this proposal was that this should only apply in release mod (since if you are trying to debug you would need to have the toolchain installed by definition).
ptal at the changes to the WASI tests: expanded them to cover both debug and release modes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks!
@@ -1959,7 +1952,7 @@ final class BuildPlanTests: XCTestCase { | |||
XCTAssertMatch(executablePathExtension, "exe") | |||
} | |||
|
|||
func testWASITarget() throws { | |||
func testWASITargetDebug() throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -2049,6 +2041,94 @@ final class BuildPlanTests: XCTestCase { | |||
XCTAssertEqual(testPathExtension, "wasm") | |||
} | |||
|
|||
func testWASITargetRelease() throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
45d8915
to
dd03aca
Compare
@swift-ci please smoke test |
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wohoo :)
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
@swift-ci please smoke test Linux |
@swift-ci please smoke test |
50cbd94
to
cda15a6
Compare
@swift-ci please smoke test linux |
0a439b9
to
20cb939
Compare
@swift-ci please smoke test |
20cb939
to
47b7691
Compare
@swift-ci smoke test |
47b7691
to
a2d598e
Compare
@swift-ci smoke test |
…pported platforms motivation: on some platforms (eg Linux) statically linking the swift runtime libraries makes more sense to allow better mobility of execuables changes: * deprecate the opt-in "static-swift-stdlib" CLI flag * introduce an opt-out "disable-static-swift-runtime" CLI flag * change behavior to automatically build/link with "-static-stdlib" in release mode on supported platforms (Linux and WASI) * adjust tests
a2d598e
to
e4afd4d
Compare
@swift-ci please smoke test |
@swift-ci please smoke test |
cc @MaxDesiatov |
This evolution proposal was accepted ~2 years ago; are we still planning on merging this change? |
Yes, but the PR needs to be updated with conflicts resolved, tests enabled/fixed etc. |
motivation: on some platforms (eg Linux) statically linking the swift runtime libraries makes more sense to allow better mobility of execuables
changes: