Skip to content

Add the remaining toolchain-distributed runtime libs to autolink-extract #64312

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 6 commits into from
Mar 27, 2023
Merged
Changes from 1 commit
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
29 changes: 28 additions & 1 deletion lib/DriverTool/autolink_extract_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,41 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0,

// Keep track of whether we've already added the common
// Swift libraries that ususally have autolink directives
// in most object fiels
// 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