Skip to content

Commit 0075695

Browse files
committed
Reordering autolink-extract runtime orderings
Order is important. The ordering generated by autolink-extract is nonsensical. I haven't had a chance to actually build the full symbol dependency graph so I'm definitely missing something, but this gets us closer to the actual library link order, so it might unblock some folks who are running into missing symbols.
1 parent a5f0dbc commit 0075695

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

lib/DriverTool/autolink_extract_main.cpp

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -217,35 +217,31 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0,
217217
// in most object files
218218

219219
std::vector<std::string> SwiftRuntimeLibsOrdered = {
220-
// Common Swift runtime libs
221-
"-lswiftSwiftOnoneSupport",
222-
"-lswiftCore",
223-
"-lswift_Concurrency",
220+
"-lFoundationXML",
221+
"-lFoundationNetworking",
222+
"-lFoundation",
223+
"-lswiftDispatch",
224+
"-lswiftRegexBuilder",
225+
"-lswift_Backtracing",
224226
"-lswift_StringProcessing",
225-
"-lswift_RegexBuilder",
226227
"-lswift_RegexParser",
227-
"-lswift_Backtracing",
228+
"-lswift_Concurrency",
228229
"-lswiftGlibc",
229-
"-lBlocksRuntime",
230-
// Dispatch-specific Swift runtime libs
230+
"-lswiftSwiftOnoneSupport",
231+
"-lswiftCore",
232+
"-lCoreFoundation",
233+
"-licui18nswift",
234+
"-licuucswift",
235+
"-licudataswift",
231236
"-ldispatch",
237+
"-lBlocksRuntime",
232238
"-lDispatchStubs",
233-
"-lswiftDispatch",
234-
// CoreFoundation and Foundation Swift runtime libs
235-
"-lCoreFoundation",
236-
"-lFoundation",
237-
"-lFoundationNetworking",
238-
"-lFoundationXML",
239-
// Foundation support libs
240239
"-lcurl",
241240
"-lxml2",
242241
"-luuid",
243242
// XCTest runtime libs (must be first due to http://github.com/apple/swift-corelibs-xctest/issues/432)
244243
"-lXCTest",
245244
// ICU Swift runtime libs
246-
"-licui18nswift",
247-
"-licuucswift",
248-
"-licudataswift",
249245
// Common-use ordering-agnostic Linux system libs
250246
"-lm",
251247
"-lpthread",

0 commit comments

Comments
 (0)