Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions lib/DriverTool/autolink_extract_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,42 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0,
std::vector<std::string> LinkerFlags;

// Keep track of whether we've already added the common
// Swift libraries that ususally have autolink directives
// in most object fiels
// Swift libraries that usually have autolink directives
// in most object files
std::unordered_map<std::string, bool> SwiftRuntimeLibraries = {
// Common Swift runtime libs
{"-lswiftSwiftOnoneSupport", false},
{"-lswiftCore", false},
{"-lswift_Concurrency", false},
{"-lswift_StringProcessing", false},
{"-lswift_RegexBuilder", false},
{"-lswift_RegexParser", false},
{"-lswift_Backtracing", false},
{"-lswiftGlibc", false},
{"-lBlocksRuntime", false},
// Dispatch-specific Swift runtime libs
{"-ldispatch", false},
{"-lDispatchStubs", false},
{"-lswiftDispatch", false},
// CoreFoundation and Foundation Swift runtime libs
{"-lCoreFoundation", false},
{"-lFoundation", false},
{"-lFoundationNetworking", false},
{"-lFoundationXML", false},
// Foundation support libs
{"-lcurl", false},
{"-lxml2", false},
{"-luuid", false},
// ICU Swift runtime libs
{"-licui18nswift", false},
{"-licuucswift", false},
{"-licudataswift", false},
// Common-use ordering-agnostic Linux system libs
{"-lm", false},
{"-lpthread", false},
{"-lutil", false},
{"-ldl", false},
{"-lz", false},
};

// Extract the linker flags from the objects.
Expand Down