diff options
author | Amir Bawab <amirbawab@gmail.com> | 2019-10-09 23:12:28 -0400 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2019-10-09 20:12:28 -0700 |
commit | 8d6f79d2b11b5ab54a6965d072afccd66629947d (patch) | |
tree | fbdb7188a2c765c7f9f2b59d970481638a6f8e17 /src/tools | |
parent | 6d39c5876efbcae17df6c6d45d371b9194fb0b28 (diff) | |
download | wabt-8d6f79d2b11b5ab54a6965d072afccd66629947d.tar.gz wabt-8d6f79d2b11b5ab54a6965d072afccd66629947d.tar.bz2 wabt-8d6f79d2b11b5ab54a6965d072afccd66629947d.zip |
Add `--version` to wabt tools (#1175)
Closes: #1106
Ported versioning system from [Binaryen CMakeLists.txt](https://github.com/WebAssembly/binaryen/blob/dc31b460fef47dfb3415b4ae6276fff4919a03e2/CMakeLists.txt#L10-L23)
```
bin/wasm2c --version
1.0.11-44-g71f883ad
```
Applied to (all) tools in `src/tools/`.
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/spectest-interp.cc | 1 | ||||
-rw-r--r-- | src/tools/wasm-decompile.cc | 1 | ||||
-rw-r--r-- | src/tools/wasm-interp.cc | 1 | ||||
-rw-r--r-- | src/tools/wasm-objdump.cc | 1 | ||||
-rw-r--r-- | src/tools/wasm-opcodecnt.cc | 1 | ||||
-rw-r--r-- | src/tools/wasm-strip.cc | 1 | ||||
-rw-r--r-- | src/tools/wasm-validate.cc | 1 | ||||
-rw-r--r-- | src/tools/wasm2c.cc | 1 | ||||
-rw-r--r-- | src/tools/wasm2wat.cc | 1 | ||||
-rw-r--r-- | src/tools/wast2json.cc | 1 | ||||
-rw-r--r-- | src/tools/wat-desugar.cc | 1 | ||||
-rw-r--r-- | src/tools/wat2wasm.cc | 1 |
12 files changed, 0 insertions, 12 deletions
diff --git a/src/tools/spectest-interp.cc b/src/tools/spectest-interp.cc index de770d24..e59895d7 100644 --- a/src/tools/spectest-interp.cc +++ b/src/tools/spectest-interp.cc @@ -70,7 +70,6 @@ static void ParseOptions(int argc, char** argv) { s_verbose++; s_log_stream = FileStream::CreateStdout(); }); - parser.AddHelpOption(); s_features.AddOptions(&parser); parser.AddOption('V', "value-stack-size", "SIZE", "Size in elements of the value stack", diff --git a/src/tools/wasm-decompile.cc b/src/tools/wasm-decompile.cc index a50d8801..d351b7bf 100644 --- a/src/tools/wasm-decompile.cc +++ b/src/tools/wasm-decompile.cc @@ -52,7 +52,6 @@ int ProgramMain(int argc, char** argv) { " # parse binary file test.wasm and write text file test.dcmp\n" " $ wasm-decompile test.wasm -o test.dcmp\n"; OptionParser parser("wasm-decompile", s_description); - parser.AddHelpOption(); parser.AddOption( 'o', "output", "FILENAME", "Output file for the decompiled file, by default use stdout", diff --git a/src/tools/wasm-interp.cc b/src/tools/wasm-interp.cc index c08a4382..d9c0aa29 100644 --- a/src/tools/wasm-interp.cc +++ b/src/tools/wasm-interp.cc @@ -83,7 +83,6 @@ static void ParseOptions(int argc, char** argv) { s_verbose++; s_log_stream = FileStream::CreateStdout(); }); - parser.AddHelpOption(); s_features.AddOptions(&parser); parser.AddOption('V', "value-stack-size", "SIZE", "Size in elements of the value stack", diff --git a/src/tools/wasm-objdump.cc b/src/tools/wasm-objdump.cc index 28a059d7..f7ef1ddd 100644 --- a/src/tools/wasm-objdump.cc +++ b/src/tools/wasm-objdump.cc @@ -60,7 +60,6 @@ static void ParseOptions(int argc, char** argv) { []() { s_objdump_options.details = true; }); parser.AddOption('r', "reloc", "Show relocations inline with disassembly", []() { s_objdump_options.relocs = true; }); - parser.AddHelpOption(); parser.AddArgument( "filename", OptionParser::ArgumentCount::OneOrMore, [](const char* argument) { s_infiles.push_back(argument); }); diff --git a/src/tools/wasm-opcodecnt.cc b/src/tools/wasm-opcodecnt.cc index 6915dc82..eb49dce4 100644 --- a/src/tools/wasm-opcodecnt.cc +++ b/src/tools/wasm-opcodecnt.cc @@ -60,7 +60,6 @@ static void ParseOptions(int argc, char** argv) { s_log_stream = FileStream::CreateStdout(); s_read_binary_options.log_stream = s_log_stream.get(); }); - parser.AddHelpOption(); s_features.AddOptions(&parser); parser.AddOption('o', "output", "FILENAME", "Output file for the opcode counts, by default use stdout", diff --git a/src/tools/wasm-strip.cc b/src/tools/wasm-strip.cc index 607ea0da..f8386720 100644 --- a/src/tools/wasm-strip.cc +++ b/src/tools/wasm-strip.cc @@ -37,7 +37,6 @@ examples: static void ParseOptions(int argc, char** argv) { OptionParser parser("wasm-strip", s_description); - parser.AddHelpOption(); parser.AddArgument("filename", OptionParser::ArgumentCount::One, [](const char* argument) { s_filename = argument; diff --git a/src/tools/wasm-validate.cc b/src/tools/wasm-validate.cc index 5ec6be1d..3d671b2f 100644 --- a/src/tools/wasm-validate.cc +++ b/src/tools/wasm-validate.cc @@ -52,7 +52,6 @@ static void ParseOptions(int argc, char** argv) { s_verbose++; s_log_stream = FileStream::CreateStdout(); }); - parser.AddHelpOption(); s_features.AddOptions(&parser); parser.AddOption("no-debug-names", "Ignore debug names in the binary file", []() { s_read_debug_names = false; }); diff --git a/src/tools/wasm2c.cc b/src/tools/wasm2c.cc index c7ce2113..d35d5789 100644 --- a/src/tools/wasm2c.cc +++ b/src/tools/wasm2c.cc @@ -62,7 +62,6 @@ static void ParseOptions(int argc, char** argv) { s_verbose++; s_log_stream = FileStream::CreateStdout(); }); - parser.AddHelpOption(); parser.AddOption( 'o', "output", "FILENAME", "Output file for the generated C source file, by default use stdout", diff --git a/src/tools/wasm2wat.cc b/src/tools/wasm2wat.cc index 53c7001c..8167c168 100644 --- a/src/tools/wasm2wat.cc +++ b/src/tools/wasm2wat.cc @@ -64,7 +64,6 @@ static void ParseOptions(int argc, char** argv) { s_verbose++; s_log_stream = FileStream::CreateStdout(); }); - parser.AddHelpOption(); parser.AddOption( 'o', "output", "FILENAME", "Output file for the generated wast file, by default use stdout", diff --git a/src/tools/wast2json.cc b/src/tools/wast2json.cc index 42d8859f..33c4895c 100644 --- a/src/tools/wast2json.cc +++ b/src/tools/wast2json.cc @@ -65,7 +65,6 @@ static void ParseOptions(int argc, char* argv[]) { s_verbose++; s_log_stream = FileStream::CreateStdout(); }); - parser.AddHelpOption(); parser.AddOption("debug-parser", "Turn on debugging the parser of wast files", []() { s_debug_parsing = true; }); s_features.AddOptions(&parser); diff --git a/src/tools/wat-desugar.cc b/src/tools/wat-desugar.cc index 0760100d..cc6a2cba 100644 --- a/src/tools/wat-desugar.cc +++ b/src/tools/wat-desugar.cc @@ -59,7 +59,6 @@ examples: static void ParseOptions(int argc, char** argv) { OptionParser parser("wat-desugar", s_description); - parser.AddHelpOption(); parser.AddOption('o', "output", "FILE", "Output file for the formatted file", [](const char* argument) { s_outfile = argument; }); parser.AddOption("debug-parser", "Turn on debugging the parser of wat files", diff --git a/src/tools/wat2wasm.cc b/src/tools/wat2wasm.cc index 04dc155d..e1bb192a 100644 --- a/src/tools/wat2wasm.cc +++ b/src/tools/wat2wasm.cc @@ -71,7 +71,6 @@ static void ParseOptions(int argc, char* argv[]) { s_verbose++; s_log_stream = FileStream::CreateStdout(); }); - parser.AddHelpOption(); parser.AddOption("debug-parser", "Turn on debugging the parser of wat files", []() { s_debug_parsing = true; }); parser.AddOption('d', "dump-module", |