[lld-macho] Ignore `-mllvm` and its argument
authorJez Ng <jezng@fb.com>
Wed, 16 Sep 2020 23:07:21 +0000 (16:07 -0700)
committerJez Ng <jezng@fb.com>
Thu, 24 Sep 2020 02:26:40 +0000 (19:26 -0700)
Test Plan:

Reviewed By: #lld-macho, compnerd, MaskRay

Differential Revision: https://reviews.llvm.org/D87803

lld/MachO/Options.td
lld/test/MachO/silent-ignore.test

index ac6424b..2a05ddf 100644 (file)
@@ -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<grp_rare>;
+def mllvm : Separate<["-"], "mllvm">,
+     HelpText<"Options to pass to LLVM">,
+     Flags<[HelpHidden]>,
+     Group<grp_rare>;
 
 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<grp_undocumented>;
-def mllvm : Flag<["-"], "mllvm">,
-     HelpText<"This option is undocumented in ld64">,
-     Flags<[HelpHidden]>,
-     Group<grp_undocumented>;
 def no_compact_unwind : Flag<["-"], "no_compact_unwind">,
      HelpText<"This option is undocumented in ld64">,
      Flags<[HelpHidden]>,
index 0d20863..3ee3b82 100644 (file)
@@ -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