summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-09-08 20:35:29 +0000
committerRui Ueyama <ruiu@google.com>2016-09-08 20:35:29 +0000
commit881406e787e4d5feec3c3035c07ad2e85c0a9b4d (patch)
tree1f8be422e216214b743856f720a2671621ae95f8
parent714b81c40adff7cb46df6adacb2a41dd282ca93b (diff)
downloadbcm5719-llvm-881406e787e4d5feec3c3035c07ad2e85c0a9b4d.tar.gz
bcm5719-llvm-881406e787e4d5feec3c3035c07ad2e85c0a9b4d.zip
Define '-undefined foo' as an alias to '-undefined=foo'.
llvm-svn: 280985
-rw-r--r--lld/ELF/Options.td3
-rw-r--r--lld/test/ELF/undefined-opt.s2
2 files changed, 4 insertions, 1 deletions
diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td
index 9ec434336db..d4ee652b656 100644
--- a/lld/ELF/Options.td
+++ b/lld/ELF/Options.td
@@ -167,7 +167,7 @@ def trace: F<"trace">, HelpText<"Print the names of the input files">;
def trace_symbol : J<"trace-symbol=">, HelpText<"Trace references to symbols">;
-def undefined: J<"undefined=">,
+def undefined: S<"undefined">,
HelpText<"Force undefined symbol during linking">;
def unresolved_symbols: J<"unresolved-symbols=">,
@@ -229,6 +229,7 @@ def alias_strip_all: Flag<["-"], "s">, Alias<strip_all>;
def alias_strip_debug_S: Flag<["-"], "S">, Alias<strip_debug>;
def alias_trace: Flag<["-"], "t">, Alias<trace>;
def alias_trace_symbol_y : JoinedOrSeparate<["-"], "y">, Alias<trace_symbol>;
+def alias_undefined_eq: J<"undefined=">, Alias<undefined>;
def alias_undefined_u: JoinedOrSeparate<["-"], "u">, Alias<undefined>;
def alias_version_V: Flag<["-"], "V">, Alias<version>;
def alias_version_v: Flag<["-"], "v">, Alias<version>;
diff --git a/lld/test/ELF/undefined-opt.s b/lld/test/ELF/undefined-opt.s
index ddd34f49b74..d8b793d7bab 100644
--- a/lld/test/ELF/undefined-opt.s
+++ b/lld/test/ELF/undefined-opt.s
@@ -31,6 +31,8 @@
# Use the option couple of times, both short and long forms
# RUN: ld.lld -o %t3 %t.o %tar.a -u bar --undefined=abs
# RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=TWO-UNDEFINED %s
+# RUN: ld.lld -o %t3 %t.o %tar.a -u bar --undefined abs
+# RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=TWO-UNDEFINED %s
# TWO-UNDEFINED: Symbols [
# TWO-UNDEFINED: Name: abs
# TWO-UNDEFINED: Name: big
OpenPOWER on IntegriCloud