Skip to content

Commit cd1db4a

Browse files
[autolink-extract] Update deduplication list for new Foundation, Testing, and WASI platform
We now have several new runtime libraries in the toolchain but they are not listed in the autolink deduplication list. This can lead to an excessive memory footprint when linking on platforms that use autolink-extract. See #58380
1 parent 47049ce commit cd1db4a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/DriverTool/autolink_extract_main.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0,
236236
"-lswiftSynchronization",
237237
"-lswiftGlibc",
238238
"-lswiftAndroid",
239+
"-lswiftWASILibc",
239240
"-lBlocksRuntime",
240241
// Dispatch-specific Swift runtime libs
241242
"-ldispatch",
@@ -249,19 +250,30 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0,
249250
"-lFoundationInternationalization",
250251
"-lFoundationNetworking",
251252
"-lFoundationXML",
253+
"-l_CFXMLInterface",
254+
"-l_FoundationCShims",
255+
"-l_FoundationCollections",
252256
// Foundation support libs
253257
"-lcurl",
254258
"-lxml2",
255259
"-luuid",
256260
"-lTesting",
257261
// XCTest runtime libs (must be first due to http://github.com/apple/swift-corelibs-xctest/issues/432)
258262
"-lXCTest",
263+
// swift-testing libraries
264+
"-l_TestingInternals",
265+
"-l_TestDiscovery",
266+
"-l_Testing_Foundation",
259267
// Common-use ordering-agnostic Linux system libs
260268
"-lm",
261269
"-lpthread",
262270
"-lutil",
263271
"-ldl",
264272
"-lz",
273+
// Common-use ordering-agnostic WASI system libs
274+
"-lwasi-emulated-getpid",
275+
"-lwasi-emulated-mman",
276+
"-lwasi-emulated-signal",
265277
};
266278
std::unordered_map<std::string, bool> SwiftRuntimeLibraries;
267279
for (const auto &RuntimeLib : SwiftRuntimeLibsOrdered) {

0 commit comments

Comments
 (0)