From: Sam Clegg Date: Wed, 31 Oct 2018 19:30:43 +0000 (+0000) Subject: [WedAssembly] Add -s and -S alias for --strip-all and --strip-debug X-Git-Tag: llvmorg-8.0.0-rc1~5319 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59d52f8040787b087af8ba142f74855c245149b4;p=platform%2Fupstream%2Fllvm.git [WedAssembly] Add -s and -S alias for --strip-all and --strip-debug llvm-svn: 345767 --- diff --git a/lld/test/wasm/strip-all.test b/lld/test/wasm/strip-all.test new file mode 100644 index 0000000..7b7c259 --- /dev/null +++ b/lld/test/wasm/strip-all.test @@ -0,0 +1,10 @@ +RUN: llc -filetype=obj %p/Inputs/start.ll -o %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 +CHECK-NOT: Name: name diff --git a/lld/test/wasm/strip-debug.test b/lld/test/wasm/strip-debug.test index be5ba70..6ee27f8c 100644 --- a/lld/test/wasm/strip-debug.test +++ b/lld/test/wasm/strip-debug.test @@ -2,5 +2,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: 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 diff --git a/lld/wasm/Options.td b/lld/wasm/Options.td index e0e125f..156e9b5 100644 --- a/lld/wasm/Options.td +++ b/lld/wasm/Options.td @@ -149,6 +149,8 @@ def: Flag<["-"], "E">, Alias, HelpText<"Alias for --export-dynam def: Flag<["-"], "i">, Alias; def: Flag<["-"], "m">, Alias; def: Flag<["-"], "r">, Alias; +def: Flag<["-"], "s">, Alias, HelpText<"Alias for --strip-all">; +def: Flag<["-"], "S">, Alias, HelpText<"Alias for --strip-debug">; def: JoinedOrSeparate<["-"], "u">, Alias; // LTO-related options.