Skip to content

Commit 0ce9157

Browse files
authored
[wasm-split] Remove ANSI codes from wast output (#7780)
Without this, wast files emitted by `-S` contain extra ANSI codes like ```wast (^[[31m^[[1mmodule^[[0m (^[[31m^[[1mfunc ^[[0m$bar (^[[33mparam ^[[0m$0 i32) (result i32) (^[[35m^[[1mcall ^[[0m$foo (i32.const ^[[33m777^[[0m) ) ) ) ``` wasm-opt has this too, although on `-o` (I think it doesn't matter) https://github.com/WebAssembly/binaryen/blob/96362ebe5f3eedc9d9a53694a16e375670cd53b1/src/tools/wasm-opt.cpp#L114-L122
1 parent f15deac commit 0ce9157

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tools/wasm-split/wasm-split.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,8 @@ void printReadableProfile(const WasmSplitOptions& options) {
567567
int main(int argc, const char* argv[]) {
568568
WasmSplitOptions options;
569569
options.parse(argc, argv);
570+
// We don't support --print for wasm-split
571+
Colors::setEnabled(false);
570572

571573
if (!options.validate()) {
572574
Fatal() << "Invalid command line arguments";

0 commit comments

Comments
 (0)