From 79412d6ca772c1c3913030cfef4b17f4afac110d Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Wed, 16 Sep 2020 16:07:21 -0700 Subject: [PATCH] [lld-macho] Ignore `-mllvm` and its argument Test Plan: Reviewed By: #lld-macho, compnerd, MaskRay Differential Revision: https://reviews.llvm.org/D87803 --- lld/MachO/Options.td | 8 ++++---- lld/test/MachO/silent-ignore.test | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lld/MachO/Options.td b/lld/MachO/Options.td index ac6424b..2a05ddf 100644 --- a/lld/MachO/Options.td +++ b/lld/MachO/Options.td @@ -857,6 +857,10 @@ def not_for_dyld_shared_cache : Flag<["-"], "not_for_dyld_shared_cache">, HelpText<"Prevent system dylibs from being placed into the dylib shared cache">, Flags<[HelpHidden]>, Group; +def mllvm : Separate<["-"], "mllvm">, + HelpText<"Options to pass to LLVM">, + Flags<[HelpHidden]>, + Group; def grp_deprecated : OptionGroup<"deprecated">, HelpText<"DEPRECATED">; @@ -1195,10 +1199,6 @@ def mcpu : Flag<["-"], "mcpu">, HelpText<"This option is undocumented in ld64">, Flags<[HelpHidden]>, Group; -def mllvm : Flag<["-"], "mllvm">, - HelpText<"This option is undocumented in ld64">, - Flags<[HelpHidden]>, - Group; def no_compact_unwind : Flag<["-"], "no_compact_unwind">, HelpText<"This option is undocumented in ld64">, Flags<[HelpHidden]>, diff --git a/lld/test/MachO/silent-ignore.test b/lld/test/MachO/silent-ignore.test index 0d20863..3ee3b82 100644 --- a/lld/test/MachO/silent-ignore.test +++ b/lld/test/MachO/silent-ignore.test @@ -5,6 +5,6 @@ RUN: -no_deduplicate \ RUN: -lto_library /lib/foo \ RUN: -macosx_version_min 0 \ RUN: -dependency_info /path/to/dependency_info.dat \ -RUN: -syslibroot /path/to/MacOSX.platform/Developer/SDKs/MacOSX.sdk +RUN: -mllvm -time-passes RUN: not lld -flavor darwinnew -v --not-an-ignored-argument 2>&1 | FileCheck %s CHECK: error: unknown argument: --not-an-ignored-argument -- 2.7.4