Skip to content
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

[SR-10624] SwiftPM doesn't hand --swift-static-stdlib through #4712

weissi opened this issue May 6, 2019 · 2 comments

[SR-10624] SwiftPM doesn't hand --swift-static-stdlib through #4712

weissi opened this issue May 6, 2019 · 2 comments


Copy link

@weissi weissi commented May 6, 2019

Previous ID SR-10624
Radar None
Original Reporter @weissi
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 732599d0f07078836c048ac4a6afe104


  • SR-648 swift package manager should have the option to produce statically linked binaries

relates to:

Issue Description:

SwiftPM just silently ignores --swift-static-stdlib on Linux.

root@2a342978afd1:/# mkdir test && cd test && swift package init --type=executable
Creating executable package: test
Creating Package.swift
Creating .gitignore
Creating Sources/
Creating Sources/test/main.swift
Creating Tests/
Creating Tests/LinuxMain.swift
Creating Tests/testTests/
Creating Tests/testTests/testTests.swift
Creating Tests/testTests/XCTestManifests.swift
root@2a342978afd1:/test# swift build --static-swift-stdlib
[2/2] Linking ./.build/x86_64-unknown-linux/debug/test
root@2a342978afd1:/test# ldd  ./.build/x86_64-unknown-linux/debug/test (0x00007ffc501e7000) => /usr/lib/swift/linux/ (0x00007fc496512000) => /usr/lib/swift/linux/ (0x00007fc495e18000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc495a8f000) => /lib/x86_64-linux-gnu/ (0x00007fc4956f1000) => /lib/x86_64-linux-gnu/ (0x00007fc4954d9000) => /lib/x86_64-linux-gnu/ (0x00007fc4950e8000) => /lib/x86_64-linux-gnu/ (0x00007fc494ec9000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc494cc1000) => /lib/x86_64-linux-gnu/ (0x00007fc494abd000) => /usr/lib/swift/linux/ (0x00007fc4945c7000) => /usr/lib/swift/linux/ (0x00007fc4941e7000) => /usr/lib/swift/linux/ (0x00007fc492642000)
    /lib64/ (0x00007fc496334000)

It just doesn't hand -static-stdlib to swiftc.

Copy link

@aciidb0mb3r aciidb0mb3r commented May 23, 2019

This is blocked by SR-648

Copy link

@aciidb0mb3r aciidb0mb3r commented May 23, 2019

Or rather, it's a dupe of that issue.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants