[PATCH] D53947: [WedAssembly] Add -s and -S alias for --strip-all and --strip-debug

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 31 11:44:45 PDT 2018


sbc100 created this revision.
Herald added subscribers: llvm-commits, aheejin.
sbc100 added a reviewer: ruiu.

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D53947

Files:
  test/wasm/strip-all.test
  test/wasm/strip-debug.test
  wasm/Options.td


Index: wasm/Options.td
===================================================================
--- wasm/Options.td
+++ wasm/Options.td
@@ -149,6 +149,8 @@
 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.
Index: test/wasm/strip-debug.test
===================================================================
--- test/wasm/strip-debug.test
+++ test/wasm/strip-debug.test
@@ -2,5 +2,9 @@
 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
Index: test/wasm/strip-all.test
===================================================================
--- test/wasm/strip-all.test
+++ test/wasm/strip-all.test
@@ -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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53947.171982.patch
Type: text/x-patch
Size: 1461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181031/55c1284c/attachment.bin>


More information about the llvm-commits mailing list