-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][Darwin] Handle reexported library arguments in driver (#86980)
`-reexport*` is the newer spelling for `-sub-library` which is already supported by the clang driver when invoking ld. Support the new spellings when passed by the user. This also helps simplify `clang-installapi` driver logic.
- Loading branch information
1 parent
ddc9892
commit 12fdf04
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// RUN: touch %t.o | ||
// RUN: %clang -target arm64-apple-darwin13 -### \ | ||
// RUN: -reexport_framework Foo -reexport-lBar -reexport_library Baz %t.o 2> %t.log | ||
|
||
// Check older spellings also work. | ||
// RUN: %clang -target arm64-apple-darwin13 -### \ | ||
// RUN: -Xlinker -reexport_framework -Xlinker Forest \ | ||
// RUN: -Xlinker -reexport-lBranch \ | ||
// RUN: -Xlinker -reexport_library -Xlinker Flower %t.o 2>> %t.log | ||
// RUN: FileCheck -check-prefix=LINK_REEXPORT %s < %t.log | ||
|
||
// LINK_REEXPORT: {{ld(.exe)?"}} | ||
// LINK_REEXPORT: "-reexport_framework" "Foo" | ||
// LINK_REEXPORT: "-reexport-lBar" | ||
// LINK_REEXPORT: "-reexport_library" "Baz" | ||
// LINK_REEXPORT: "-reexport_framework" "Forest" | ||
// LINK_REEXPORT: "-reexport-lBranch" | ||
// LINK_REEXPORT: "-reexport_library" "Flower" | ||
|
||
// Make sure arguments are not repeated. | ||
// LINK_REEXPORT-NOT: "-reexport |