Skip to content

[Runtime] Fix generation of .lnk files for static linking. #73484

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

Merged
merged 1 commit into from
May 8, 2024

Conversation

al45tair
Copy link
Contributor

@al45tair al45tair commented May 7, 2024

Use the new SWIFT_SDK_<sdk>_STATIC_LINKING_SUPPORTED and _STATIC_ONLY flags instead of hardcoding support for Linux and WASI.

Also, use the _LIB_SUBDIR variable rather than lowercasing the SDK.

rdar://123504757

Use the new `SWIFT_SDK_<sdk>_STATIC_LINKING_SUPPORTED` and
`_STATIC_ONLY` flags instead of hardcoding support for Linux
and WASI.

Also, use the `_LIB_SUBDIR` variable rather than lowercasing
the SDK.

rdar://123504757
@al45tair al45tair added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels May 7, 2024
@al45tair al45tair requested a review from a team as a code owner May 7, 2024 19:32
@al45tair
Copy link
Contributor Author

al45tair commented May 7, 2024

Explanation: SwiftPM needs .lnk files when statically linking to determine which libraries it should link by default. These need updating to support the fully static SDK.
Original PR: #71843
Risk: Low. Only affects static linking, and should have the same behaviour as existing build script code for Linux and WASI.
Reviewed by: @MaxDesiatov
Resolves: rdar://123504757
Tests: There are some static linking tests in the repo already; the changes that affect the new static SDK are currently tested manually (by building some code with SwiftPM), but there will be CI at some point soon.

@al45tair
Copy link
Contributor Author

al45tair commented May 7, 2024

@swift-ci Please test

@al45tair al45tair merged commit d1d6e9a into swiftlang:release/6.0 May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants