[lld] r262550 - Allow joined options to fix http://llvm.org/pr26730.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 16:09:02 PST 2016
Author: ruiu
Date: Wed Mar 2 18:09:02 2016
New Revision: 262550
URL: http://llvm.org/viewvc/llvm-project?rev=262550&view=rev
Log:
Allow joined options to fix http://llvm.org/pr26730.
Modified:
lld/trunk/ELF/Options.td
lld/trunk/test/ELF/driver.test
Modified: lld/trunk/ELF/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Options.td?rev=262550&r1=262549&r2=262550&view=diff
==============================================================================
--- lld/trunk/ELF/Options.td (original)
+++ lld/trunk/ELF/Options.td Wed Mar 2 18:09:02 2016
@@ -91,7 +91,7 @@ def noinhibit_exec : Flag<["--"], "noinh
def no_undefined : Flag<["--"], "no-undefined">,
HelpText<"Report unresolved symbols even if the linker is creating a shared library">;
-def o : Separate<["-"], "o">, MetaVarName<"<path>">,
+def o : JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
HelpText<"Path to file to write output">;
def print_gc_sections: Flag<["--"], "print-gc-sections">,
@@ -103,7 +103,8 @@ def rpath : Separate<["-"], "rpath">,
def relocatable : Flag<["--"], "relocatable">,
HelpText<"Create relocatable object file">;
-def script : Separate<["--"], "script">, HelpText<"Read linker script">;
+def script : Separate<["--"], "script">,
+ HelpText<"Read linker script">;
def shared : Flag<["-"], "shared">,
HelpText<"Build a shared object">;
@@ -143,7 +144,7 @@ def alias_Bstatic_static: Flag<["-"], "s
def alias_L__library_path : Joined<["--"], "library-path=">, Alias<L>;
def alias_discard_all_x: Flag<["-"], "x">, Alias<discard_all>;
def alias_discard_locals_X: Flag<["-"], "X">, Alias<discard_locals>;
-def alias_entry_e : Separate<["-"], "e">, Alias<entry>;
+def alias_entry_e : JoinedOrSeparate<["-"], "e">, Alias<entry>;
def alias_export_dynamic_E: Flag<["-"], "E">, Alias<export_dynamic>;
def alias_fini_fini : Joined<["-"], "fini=">, Alias<fini>;
def alias_hash_style_hash_style : Joined<["--", "-"], "hash-style=">, Alias<hash_style>;
@@ -153,11 +154,11 @@ def alias_o_output : Joined<["--"], "out
def alias_rpath_rpath : Joined<["-"], "rpath=">, Alias<rpath>;
def alias_relocatable_r : Flag<["-"], "r">, Alias<relocatable>;
def alias_shared_Bshareable : Flag<["-"], "Bshareable">, Alias<shared>;
-def alias_soname_h : Separate<["-"], "h">, Alias<soname>;
+def alias_soname_h : JoinedOrSeparate<["-"], "h">, Alias<soname>;
def alias_soname_soname : Separate<["-"], "soname">, Alias<soname>;
-def alias_script_T : Separate<["-"], "T">, Alias<script>;
+def alias_script_T : JoinedOrSeparate<["-"], "T">, Alias<script>;
def alias_strip_all: Flag<["-"], "s">, Alias<strip_all>;
-def alias_undefined_u : Separate<["-"], "u">, Alias<undefined>;
+def alias_undefined_u : JoinedOrSeparate<["-"], "u">, Alias<undefined>;
def alias_wrap_wrap : Joined<["--", "-"], "wrap=">, Alias<wrap>;
// Our symbol resolution algorithm handles symbols in archive files differently
Modified: lld/trunk/test/ELF/driver.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/driver.test?rev=262550&r1=262549&r2=262550&view=diff
==============================================================================
--- lld/trunk/test/ELF/driver.test (original)
+++ lld/trunk/test/ELF/driver.test Wed Mar 2 18:09:02 2016
@@ -1,10 +1,10 @@
# REQUIRES: x86
-# RUN: not ld.lld -unknown1 -unknown2 -m foo /no/such/file -lnosuchlib \
+# RUN: not ld.lld --unknown1 --unknown2 -m foo /no/such/file -lnosuchlib \
# RUN: 2>&1 | FileCheck -check-prefix=UNKNOWN %s
-# UNKNOWN: warning: unknown argument: -unknown1
-# UNKNOWN: warning: unknown argument: -unknown2
+# UNKNOWN: warning: unknown argument: --unknown1
+# UNKNOWN: warning: unknown argument: --unknown2
# UNKNOWN: unknown argument(s) found
# UNKNOWN: Unknown emulation: foo
# UNKNOWN: cannot open /no/such/file
More information about the llvm-commits
mailing list