[PATCH] D47994: [Darwin] Do not error on '-lto_library' option

Brian Gesiak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 12:04:39 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD334641: [Darwin] Do not error on '-lto_library' option (authored by modocache, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D47994?vs=150885&id=151221#toc

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D47994

Files:
  lib/Driver/DarwinLdOptions.td
  test/darwin/cmdline-lto_library.objtxt


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
+...
Index: lib/Driver/DarwinLdOptions.td
===================================================================
--- lib/Driver/DarwinLdOptions.td
+++ lib/Driver/DarwinLdOptions.td
@@ -231,6 +231,10 @@
      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">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47994.151221.patch
Type: text/x-patch
Size: 1040 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180613/bfea1b32/attachment.bin>


More information about the llvm-commits mailing list