Skip to content

Commit a2f3443

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 ab12c4d commit a2f3443

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

lib/DriverTool/autolink_extract_main.cpp

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -247,35 +247,31 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0,
247247
// in most object files
248248

249249
std::vector<std::string> SwiftRuntimeLibsOrdered = {
250-
// Common Swift runtime libs
251250
"-lswiftSwiftOnoneSupport",
252-
"-lswiftCore",
253-
"-lswift_Concurrency",
251+
"-lFoundationXML",
252+
"-lFoundationNetworking",
253+
"-lFoundation",
254+
"-lswiftDispatch",
255+
"-lswiftRegexBuilder",
254256
"-lswift_StringProcessing",
255-
"-lswift_RegexBuilder",
256257
"-lswift_RegexParser",
257258
"-lswift_Backtracing",
259+
"-lswift_Concurrency",
258260
"-lswiftGlibc",
259-
"-lBlocksRuntime",
260-
// Dispatch-specific Swift runtime libs
261+
"-lswiftCore",
262+
"-lCoreFoundation",
263+
"-licui18nswift",
264+
"-licuucswift",
265+
"-licudataswift",
261266
"-ldispatch",
267+
"-lBlocksRuntime",
262268
"-lDispatchStubs",
263-
"-lswiftDispatch",
264-
// CoreFoundation and Foundation Swift runtime libs
265-
"-lCoreFoundation",
266-
"-lFoundation",
267-
"-lFoundationNetworking",
268-
"-lFoundationXML",
269-
// Foundation support libs
270269
"-lcurl",
271270
"-lxml2",
272271
"-luuid",
273272
// XCTest runtime libs (must be first due to http://github.com/apple/swift-corelibs-xctest/issues/432)
274273
"-lXCTest",
275274
// ICU Swift runtime libs
276-
"-licui18nswift",
277-
"-licuucswift",
278-
"-licudataswift",
279275
// Common-use ordering-agnostic Linux system libs
280276
"-lm",
281277
"-lpthread",

0 commit comments

Comments
 (0)