summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/Driver/DarwinLdOptions.td4
-rw-r--r--lld/test/darwin/cmdline-lto_library.objtxt11
2 files changed, 15 insertions, 0 deletions
diff --git a/lld/lib/Driver/DarwinLdOptions.td b/lld/lib/Driver/DarwinLdOptions.td
index e5581111391..3bbde8bf1c1 100644
--- a/lld/lib/Driver/DarwinLdOptions.td
+++ b/lld/lib/Driver/DarwinLdOptions.td
@@ -231,6 +231,10 @@ def error_limit : Separate<["-", "--"], "error-limit">,
MetaVarName<"<number>">,
HelpText<"Maximum number of errors to emit before stopping (0 = no limit)">;
+// Ignored options
+def lto_library : Separate<["-"], "lto_library">,
+ MetaVarName<"<path>">,
+ HelpText<"Ignored for compatibility with other linkers">;
// Obsolete options
def grp_obsolete : OptionGroup<"obsolete">, HelpText<"OBSOLETE OPTIONS">;
diff --git a/lld/test/darwin/cmdline-lto_library.objtxt b/lld/test/darwin/cmdline-lto_library.objtxt
new file mode 100644
index 00000000000..6b91235560b
--- /dev/null
+++ b/lld/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
+...
OpenPOWER on IntegriCloud