Skip to content

Commit 390fb1c

Browse files
committed
[Autolink Extract] Filter out StringProcessing library from being linked more than once.
We cannot filter all libraries because duplicate -l flags have a semantic meaning based on their order, but filtering out just the common Swift libraries should yield a good size improvement already and is safe.
1 parent f3feea5 commit 390fb1c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/DriverTool/autolink_extract_main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ int autolink_extract_main(ArrayRef<const char *> Args, const char *Argv0,
249249
{"-lswiftSwiftOnoneSupport", false},
250250
{"-lswiftCore", false},
251251
{"-lswift_Concurrency", false},
252+
{"-lswift_StringProcessing", false},
252253
};
253254

254255
// Extract the linker flags from the objects.

test/AutolinkExtract/import.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// REQUIRES: autolink-extract
1010

1111
// UNIQUE-COUNT-1: -lswiftCore
12+
// UNIQUE-COUNT-1: -lswift_StringProcessing
1213

1314
// CHECK-elf-DAG: -lswiftCore
1415
// CHECK-elf-DAG: -lempty

0 commit comments

Comments
 (0)