[lld] r345767 - [WedAssembly] Add -s and -S alias for --strip-all and --strip-debug
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 31 12:30:43 PDT 2018
Author: sbc
Date: Wed Oct 31 12:30:43 2018
New Revision: 345767
URL: http://llvm.org/viewvc/llvm-project?rev=345767&view=rev
Log:
[WedAssembly] Add -s and -S alias for --strip-all and --strip-debug
Added:
lld/trunk/test/wasm/strip-all.test
- copied, changed from r345648, lld/trunk/test/wasm/strip-debug.test
Modified:
lld/trunk/test/wasm/strip-debug.test
lld/trunk/wasm/Options.td
Copied: lld/trunk/test/wasm/strip-all.test (from r345648, lld/trunk/test/wasm/strip-debug.test)
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/strip-all.test?p2=lld/trunk/test/wasm/strip-all.test&p1=lld/trunk/test/wasm/strip-debug.test&r1=345648&r2=345767&rev=345767&view=diff
==============================================================================
--- lld/trunk/test/wasm/strip-debug.test (original)
+++ lld/trunk/test/wasm/strip-all.test Wed Oct 31 12:30:43 2018
@@ -1,5 +1,9 @@
RUN: llc -filetype=obj %p/Inputs/start.ll -o %t.start.o
-RUN: wasm-ld --strip-debug -o %t.wasm %t.start.o
+RUN: wasm-ld --strip-all -o %t.wasm %t.start.o
+RUN: obj2yaml %t.wasm | FileCheck %s
+
+# Test alias -s
+RUN: wasm-ld -s -o %t.wasm %t.start.o
RUN: obj2yaml %t.wasm | FileCheck %s
# Check that there is no name section
Modified: lld/trunk/test/wasm/strip-debug.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/strip-debug.test?rev=345767&r1=345766&r2=345767&view=diff
==============================================================================
--- lld/trunk/test/wasm/strip-debug.test (original)
+++ lld/trunk/test/wasm/strip-debug.test Wed Oct 31 12:30:43 2018
@@ -2,5 +2,9 @@ RUN: llc -filetype=obj %p/Inputs/start.l
RUN: wasm-ld --strip-debug -o %t.wasm %t.start.o
RUN: obj2yaml %t.wasm | FileCheck %s
+# Test alias -S
+RUN: wasm-ld -S -o %t.wasm %t.start.o
+RUN: obj2yaml %t.wasm | FileCheck %s
+
# Check that there is no name section
CHECK-NOT: Name: name
Modified: lld/trunk/wasm/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Options.td?rev=345767&r1=345766&r2=345767&view=diff
==============================================================================
--- lld/trunk/wasm/Options.td (original)
+++ lld/trunk/wasm/Options.td Wed Oct 31 12:30:43 2018
@@ -149,6 +149,8 @@ def: Flag<["-"], "E">, Alias<export_dyna
def: Flag<["-"], "i">, Alias<initial_memory>;
def: Flag<["-"], "m">, Alias<max_memory>;
def: Flag<["-"], "r">, Alias<relocatable>;
+def: Flag<["-"], "s">, Alias<strip_all>, HelpText<"Alias for --strip-all">;
+def: Flag<["-"], "S">, Alias<strip_debug>, HelpText<"Alias for --strip-debug">;
def: JoinedOrSeparate<["-"], "u">, Alias<undefined>;
// LTO-related options.
More information about the llvm-commits
mailing list