[PATCH] D47657: ELF: Ignore argument after --plugin.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 14:49:14 PDT 2018


pcc updated this revision to Diff 149559.
pcc added a comment.

- Add test


https://reviews.llvm.org/D47657

Files:
  lld/ELF/Options.td
  lld/test/ELF/ignore-plugin.test


Index: lld/test/ELF/ignore-plugin.test
===================================================================
--- /dev/null
+++ lld/test/ELF/ignore-plugin.test
@@ -0,0 +1,2 @@
+RUN: not ld.lld --plugin foo 2>&1 | FileCheck %s
+CHECK: no input files
Index: lld/ELF/Options.td
===================================================================
--- lld/ELF/Options.td
+++ lld/ELF/Options.td
@@ -443,7 +443,7 @@
 // just ignore the option on lld side as it's easier. In fact, the linker could
 // be called 'ld' and understanding which linker is used would require parsing of
 // --version output.
-def plugin: J<"plugin">;
+defm plugin: Eq<"plugin", "Ignored for compatibility with GNU linkers">;
 
 def plugin_opt_fresolution_eq: J<"plugin-opt=-fresolution=">;
 def plugin_opt_pass_through_eq: J<"plugin-opt=-pass-through=">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47657.149559.patch
Type: text/x-patch
Size: 822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180601/5bdc2ad9/attachment.bin>


More information about the llvm-commits mailing list