[lld-macho] Ignore -dependency_info and its argument
authorJez Ng <jezng@fb.com>
Fri, 24 Jul 2020 22:55:14 +0000 (15:55 -0700)
committerJez Ng <jezng@fb.com>
Fri, 24 Jul 2020 22:55:27 +0000 (15:55 -0700)
XCode passes in this flag, which we do not yet implement. Skip
over the argument for now so we can at least successfully parse the
linker invocation.

Reviewed By: #lld-macho, compnerd

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

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

index 1e42542..7d81ca7 100644 (file)
@@ -456,6 +456,11 @@ def map : Separate<["-"], "map">,
      HelpText<"Writes all symbols and their addresses to <path>">,
      Flags<[HelpHidden]>,
      Group<grp_introspect>;
+def dependency_info : Separate<["-"], "dependency_info">,
+     MetaVarName<"<path>">,
+     HelpText<"Dump dependency info">,
+     Flags<[HelpHidden]>,
+     Group<grp_introspect>;
 
 def grp_symtab : OptionGroup<"symtab">, HelpText<"SYMBOL TABLE OPTIMIZATIONS">;
 
@@ -1098,10 +1103,6 @@ def demangle : Flag<["-"], "demangle">,
      HelpText<"This option is undocumented in ld64">,
      Flags<[HelpHidden]>,
      Group<grp_undocumented>;
-def dependency_info : Flag<["-"], "dependency_info">,
-     HelpText<"This option is undocumented in ld64">,
-     Flags<[HelpHidden]>,
-     Group<grp_undocumented>;
 def dyld_env : Flag<["-"], "dyld_env">,
      HelpText<"This option is undocumented in ld64">,
      Flags<[HelpHidden]>,
index ae68dd8..0d20863 100644 (file)
@@ -4,6 +4,7 @@ RUN:   -dynamic \
 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: not lld -flavor darwinnew -v --not-an-ignored-argument 2>&1 | FileCheck %s
 CHECK: error: unknown argument: --not-an-ignored-argument