Skip to content

Commit 39fe729

Browse files
authored
[lld-macho] Ignore -no_warn_duplicate_libraries flag (#86303)
This is a new ld64 flag (along with `-warn_duplicate_libraries`), where the warning is enabled by default, and it can be useful to ignore since it can be hard to dedup library flags across large builds. This doesn't ignore the enabling version since if someone manually passed that and lld didn't respect it, we probably want the user to know that.
1 parent 36b8643 commit 39fe729

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lld/MachO/Options.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,3 +1413,9 @@ def debug_variant : Flag<["-"], "debug_variant">,
14131413
HelpText<"Do not warn about issues that are only problems for binaries shipping to customers.">,
14141414
Flags<[HelpHidden]>,
14151415
Group<grp_ignored_silently>;
1416+
1417+
// NOTE: This flag should be respected if -warn_duplicate_libraries is ever implemented.
1418+
def no_warn_duplicate_libraries : Flag<["-"], "no_warn_duplicate_libraries">,
1419+
HelpText<"Do not warn if the input contains duplicate library options.">,
1420+
Flags<[HelpHidden]>,
1421+
Group<grp_ignored_silently>;

lld/test/MachO/silent-ignore.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
## Check that we don't emit any warnings nor errors for these unimplemented flags.
2222
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
23-
# RUN: %lld %t.o -o /dev/null -objc_abi_version 2 -debug_variant
23+
# RUN: %lld %t.o -o /dev/null -objc_abi_version 2 -debug_variant -no_warn_duplicate_libraries
2424

2525
.globl _main
2626
_main:

0 commit comments

Comments
 (0)