diff options
| author | Sam Clegg <sbc@chromium.org> | 2018-10-31 19:30:43 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2018-10-31 19:30:43 +0000 |
| commit | 59d52f8040787b087af8ba142f74855c245149b4 (patch) | |
| tree | c947c0f3487821e69555f7d790341a1b94f31c12 | |
| parent | f8405bf46b6c936f17ab42848f29a13e77a51fc0 (diff) | |
| download | bcm5719-llvm-59d52f8040787b087af8ba142f74855c245149b4.tar.gz bcm5719-llvm-59d52f8040787b087af8ba142f74855c245149b4.zip | |
[WedAssembly] Add -s and -S alias for --strip-all and --strip-debug
llvm-svn: 345767
| -rw-r--r-- | lld/test/wasm/strip-all.test | 10 | ||||
| -rw-r--r-- | lld/test/wasm/strip-debug.test | 4 | ||||
| -rw-r--r-- | lld/wasm/Options.td | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/lld/test/wasm/strip-all.test b/lld/test/wasm/strip-all.test new file mode 100644 index 00000000000..7b7c25963bc --- /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 be5ba700e25..6ee27f8c8a7 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 e0e125f84a4..156e9b57fa6 100644 --- a/lld/wasm/Options.td +++ b/lld/wasm/Options.td @@ -149,6 +149,8 @@ def: Flag<["-"], "E">, Alias<export_dynamic>, HelpText<"Alias for --export-dynam 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. |

