[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.
This commit is contained in:
Artem Chikin
2022-11-28 15:39:34 -08:00
parent 3617b7603c
commit a69ba3a03c
2 changed files with 6 additions and 2 deletions

View File

@@ -4,11 +4,13 @@
// RUN: %target-swift-autolink-extract %t/import_experimental.o -o - | %FileCheck --check-prefix CHECK-%target-object-format %s
// RUN: %target-swiftc_driver -c %s -I %t -o %t/import_experimental_again.o
// RUN: %target-swift-autolink-extract %t/import_experimental.o %t/import_experimental_again.o -o - | %FileCheck --check-prefix CHECK-%target-object-format %s
// RUN: %target-swift-autolink-extract %t/import_experimental.o %t/import_experimental_again.o -o - | %FileCheck --check-prefix UNIQUE %s
// RUN: %target-swift-autolink-extract %t/import_experimental.o %t/import_experimental_again.o -o - | %FileCheck --check-prefix UNIQUECORE %s
// RUN: %target-swift-autolink-extract %t/import_experimental.o %t/import_experimental_again.o -o - | %FileCheck --check-prefix UNIQUESTRING %s
// REQUIRES: autolink-extract
// UNIQUE-COUNT-1: -lswiftCore
// UNIQUECORE-COUNT-1: -lswiftCore
// UNIQUESTRING-COUNT-1: -lswift_StringProcessing
// CHECK-elf-DAG: -lswiftCore
// CHECK-elf-DAG: -lempty