Skip to content

Commit b76f303

Browse files
gwynneMaxDesiatov
authored andcommitted
Add the remaining toolchain-distributed runtime libs to autolink-extract deduplication
# Conflicts: # lib/DriverTool/autolink_extract_main.cpp
1 parent 9eefc24 commit b76f303

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

lib/DriverTool/autolink_extract_main.cpp

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,41 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0,
244244

245245
// Keep track of whether we've already added the common
246246
// Swift libraries that ususally have autolink directives
247-
// in most object fiels
247+
// in most object files
248248
std::unordered_map<std::string, bool> SwiftRuntimeLibraries = {
249+
// Common Swift runtime libs
249250
{"-lswiftSwiftOnoneSupport", false},
250251
{"-lswiftCore", false},
251252
{"-lswift_Concurrency", false},
252253
{"-lswift_StringProcessing", false},
253-
{"-lswift_RegexParser", false}
254+
{"-lswift_RegexBuilder", false},
255+
{"-lswift_RegexParser", false},
256+
{"-lswift_Backtracing", false},
257+
{"-lswiftGlibc", false},
258+
{"-lBlocksRuntime", false},
259+
// Dispatch-specific Swift runtime libs
260+
{"-ldispatch", false},
261+
{"-lDispatchStubs", false},
262+
{"-lswiftDispatch", false},
263+
// CoreFoundation and Foundation Swift runtime libs
264+
{"-lCoreFoundation", false},
265+
{"-lFoundation", false},
266+
{"-lFoundationNetworking", false},
267+
{"-lFoundationXML", false},
268+
// Foundation support libs
269+
{"-lcurl", false},
270+
{"-lxml2", false},
271+
{"-luuid", false},
272+
// ICU Swift runtime libs
273+
{"-licui18nswift", false},
274+
{"-licuucswift", false},
275+
{"-licudataswift", false},
276+
// Common-use ordering-agnostic Linux system libs
277+
{"-lm", false},
278+
{"-lpthread", false},
279+
{"-lutil", false},
280+
{"-ldl", false},
281+
{"-lz", false},
254282
};
255283

256284
// Extract the linker flags from the objects.

0 commit comments

Comments
 (0)