-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[autolink-extract] Update deduplication list for new Foundation, Testing, and WASI platform #84784
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -236,6 +236,7 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0, | |
| "-lswiftSynchronization", | ||
| "-lswiftGlibc", | ||
| "-lswiftAndroid", | ||
| "-lswiftWASILibc", | ||
| "-lBlocksRuntime", | ||
| // Dispatch-specific Swift runtime libs | ||
| "-ldispatch", | ||
|
|
@@ -249,19 +250,30 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0, | |
| "-lFoundationInternationalization", | ||
| "-lFoundationNetworking", | ||
| "-lFoundationXML", | ||
| "-l_CFXMLInterface", | ||
| "-l_FoundationCShims", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another static-only library, bit taken aback since the first time I'm seeing these listed here, sure you need this? |
||
| "-l_FoundationCollections", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, static-only, I guess you're static linking the runtime libraries much more for Wasm binaries? |
||
| // Foundation support libs | ||
| "-lcurl", | ||
| "-lxml2", | ||
| "-luuid", | ||
| "-lTesting", | ||
| // XCTest runtime libs (must be first due to http://github.com/apple/swift-corelibs-xctest/issues/432) | ||
| "-lXCTest", | ||
| // swift-testing libraries | ||
| "-l_TestingInternals", | ||
| "-l_TestDiscovery", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see either of these in the linux SDK, Wasm only? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are also static-only libraries, installed only when building swift-testing with Other platform toolchains/SDKs don't have it because they always build it as shared libraries. |
||
| "-l_Testing_Foundation", | ||
| // Common-use ordering-agnostic Linux system libs | ||
| "-lm", | ||
| "-lpthread", | ||
| "-lutil", | ||
| "-ldl", | ||
| "-lz", | ||
| // Common-use ordering-agnostic WASI system libs | ||
| "-lwasi-emulated-getpid", | ||
| "-lwasi-emulated-mman", | ||
| "-lwasi-emulated-signal", | ||
| }; | ||
| std::unordered_map<std::string, bool> SwiftRuntimeLibraries; | ||
| for (const auto &RuntimeLib : SwiftRuntimeLibsOrdered) { | ||
|
|
||
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.
This is a static-only CoreFoundation library: I thought we weren't supposed to publicly link these?
Uh oh!
There was an error while loading. Please reload this page.
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.
Good point, yes. They are static-only libraries and we static-link everything. They are not supposed to be imported at code, so they don't have their corresponding .swiftmodule but we still ship their archives. So those link options are embedded in the client of those private modules (in this case, FoundationXML.swiftmodule) through
-public-autolink-libraryhttps://github.com/swiftlang/swift-corelibs-foundation/blob/ec675206c8cd939fbd4783421ea07954dcb5e175/Sources/FoundationXML/CMakeLists.txt#L33-L47