Skip to content

Commit 52a15b3

Browse files
authored
[NFC] Fix help text for tools that emit binary (#7398)
Our tools all stated that if -o is not provided, we write to stdout by default. But that is not true - we do nothing in that case. I believe the rationale is that we write text to stdout by default in say wasm2js, but for wasm-opt etc. we don't want to write binary to stdout (as that is dangerous).
1 parent def4095 commit 52a15b3

File tree

10 files changed

+10
-12
lines changed

10 files changed

+10
-12
lines changed

src/tools/wasm-as.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main(int argc, const char* argv[]) {
4444
options
4545
.add("--output",
4646
"-o",
47-
"Output file (stdout if not specified)",
47+
"Output file",
4848
WasmAsOption,
4949
Options::Arguments::One,
5050
[](Options* o, const std::string& argument) {

src/tools/wasm-ctor-eval.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ int main(int argc, const char* argv[]) {
13741374
options
13751375
.add("--output",
13761376
"-o",
1377-
"Output file (stdout if not specified)",
1377+
"Output file",
13781378
WasmCtorEvalOption,
13791379
Options::Arguments::One,
13801380
[](Options* o, const std::string& argument) {

src/tools/wasm-merge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ Input source maps can be specified by adding an -ism option right after the modu
590590
options
591591
.add("--output",
592592
"-o",
593-
"Output file (stdout if not specified)",
593+
"Output file",
594594
WasmMergeOption,
595595
Options::Arguments::One,
596596
[](Options* o, const std::string& argument) {

src/tools/wasm-metadce.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ int main(int argc, const char* argv[]) {
423423
options
424424
.add("--output",
425425
"-o",
426-
"Output file (stdout if not specified)",
426+
"Output file",
427427
WasmMetaDCEOption,
428428
Options::Arguments::One,
429429
[](Options* o, const std::string& argument) {

src/tools/wasm-opt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ int main(int argc, const char* argv[]) {
9999
options
100100
.add("--output",
101101
"-o",
102-
"Output file (stdout if not specified)",
102+
"Output file",
103103
WasmOptOption,
104104
Options::Arguments::One,
105105
[](Options* o, const std::string& argument) {

test/lit/help/wasm-as.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
;; CHECK-NEXT: wasm-as options:
1111
;; CHECK-NEXT: ----------------
1212
;; CHECK-NEXT:
13-
;; CHECK-NEXT: --output,-o Output file (stdout if not specified)
13+
;; CHECK-NEXT: --output,-o Output file
1414
;; CHECK-NEXT:
1515
;; CHECK-NEXT: --validate,-v Control validation of the output module
1616
;; CHECK-NEXT:

test/lit/help/wasm-ctor-eval.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
;; CHECK-NEXT: wasm-ctor-eval options:
1010
;; CHECK-NEXT: -----------------------
1111
;; CHECK-NEXT:
12-
;; CHECK-NEXT: --output,-o Output file (stdout if not specified)
12+
;; CHECK-NEXT: --output,-o Output file
1313
;; CHECK-NEXT:
1414
;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for the
1515
;; CHECK-NEXT: output file

test/lit/help/wasm-merge.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
;; CHECK-NEXT: wasm-merge options:
2626
;; CHECK-NEXT: -------------------
2727
;; CHECK-NEXT:
28-
;; CHECK-NEXT: --output,-o Output file (stdout if not specified)
28+
;; CHECK-NEXT: --output,-o Output file
2929
;; CHECK-NEXT:
3030
;; CHECK-NEXT: --input-source-map,-ism Consume source maps from the specified
3131
;; CHECK-NEXT: files

test/lit/help/wasm-metadce.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
;; CHECK-NEXT: wasm-opt options:
5252
;; CHECK-NEXT: -----------------
5353
;; CHECK-NEXT:
54-
;; CHECK-NEXT: --output,-o Output file (stdout if not
55-
;; CHECK-NEXT: specified)
54+
;; CHECK-NEXT: --output,-o Output file
5655
;; CHECK-NEXT:
5756
;; CHECK-NEXT: --input-source-map,-ism Consume source map from the
5857
;; CHECK-NEXT: specified file

test/lit/help/wasm-opt.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
;; CHECK-NEXT: wasm-opt options:
1010
;; CHECK-NEXT: -----------------
1111
;; CHECK-NEXT:
12-
;; CHECK-NEXT: --output,-o Output file (stdout if not
13-
;; CHECK-NEXT: specified)
12+
;; CHECK-NEXT: --output,-o Output file
1413
;; CHECK-NEXT:
1514
;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for
1615
;; CHECK-NEXT: the output file

0 commit comments

Comments
 (0)