From 89164cdf1403a21a3d79ada0f0cf529d526c9de6 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 26 Jan 2021 14:49:45 +0000 Subject: Warn when running a pass not compatible with DWARF (#3506) Previously the addDefault* methods would avoid adding opt passes that we know are incompatible with DWARF. However, that didn't handle the case of passes that are added in other ways. For example, when running Asyncify, emcc will run --flatten before, and that pass is not compatible with DWARF. This PR lets us warn on that by annotating the passes themselves. Then we use those annotation to either not run a pass at all (matching the previous behavior) or to show a warning when necessary. Fixes emscripten-core/emscripten#13288 . That is, concretely after this PR running asyncify + DWARF will show a warning to the user. --- scripts/test/wasm_opt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/test') diff --git a/scripts/test/wasm_opt.py b/scripts/test/wasm_opt.py index ab708c636..588c79ab9 100644 --- a/scripts/test/wasm_opt.py +++ b/scripts/test/wasm_opt.py @@ -74,7 +74,8 @@ def test_wasm_opt(): # also check pass-debug mode def check(): - pass_debug = support.run_command(cmd) + # ignore stderr, as the pass-debug output is very verbose in CI + pass_debug = support.run_command(cmd, stderr=subprocess.PIPE) shared.fail_if_not_identical(curr, pass_debug) shared.with_pass_debug(check) -- cgit v1.2.3