Index: lib/Driver/DarwinLdOptions.td =================================================================== --- lib/Driver/DarwinLdOptions.td +++ lib/Driver/DarwinLdOptions.td @@ -231,6 +231,10 @@ MetaVarName<"">, HelpText<"Maximum number of errors to emit before stopping (0 = no limit)">; +// Ignored options +def lto_library : Separate<["-"], "lto_library">, + MetaVarName<"">, + HelpText<"Ignored for compatibility with other linkers">; // Obsolete options def grp_obsolete : OptionGroup<"obsolete">, HelpText<"OBSOLETE OPTIONS">; Index: test/darwin/cmdline-lto_library.objtxt =================================================================== --- test/darwin/cmdline-lto_library.objtxt +++ test/darwin/cmdline-lto_library.objtxt @@ -0,0 +1,11 @@ +# RUN: ld64.lld -arch x86_64 -lto_library %t -print-atoms -r %s 2>&1 | FileCheck %s +# +# Test that the -lto_library option does not result in an error. +# + +# CHECK-NOT: -lto_library + +--- !native +defined-atoms: + - name: _foo +...