Skip to content

Commit 89511ee

Browse files
committed
[lld-macho] Ignore -no_warn_duplicate_libraries flag
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 8155ec1 commit 89511ee

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lld/MachO/Options.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,3 +1407,7 @@ def debug_variant : Flag<["-"], "debug_variant">,
14071407
HelpText<"Do not warn about issues that are only problems for binaries shipping to customers.">,
14081408
Flags<[HelpHidden]>,
14091409
Group<grp_ignored_silently>;
1410+
def no_warn_duplicate_libraries : Flag<["-"], "no_warn_duplicate_libraries">,
1411+
HelpText<"Do not warn if the input contains duplicate library options.">,
1412+
Flags<[HelpHidden]>,
1413+
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)