From a185d6355b5988b03df0008eba20bbd82d1c6d1d Mon Sep 17 00:00:00 2001 From: Jonas Finnemann Jensen Date: Mon, 1 Jun 2026 02:02:26 -0700 Subject: [PATCH] Use only -O2 for dart2wasm when compiling dartpad_worker Because -O4 might not have correct semantics. Change-Id: Icaa3ccd1bd219e0c94e7217086c923924061fe9f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507420 Reviewed-by: Sigurd Meldgaard Commit-Queue: Jonas Jensen --- utils/dartpad/compile_wasm.gni | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/dartpad/compile_wasm.gni b/utils/dartpad/compile_wasm.gni index 1ee2aa211b1..52ed5eadd84 100644 --- a/utils/dartpad/compile_wasm.gni +++ b/utils/dartpad/compile_wasm.gni @@ -103,13 +103,11 @@ template("compile_dart2wasm") { "--wasm-opt=" + rebase_path(wasm_opt_binary, root_build_dir), "--phases=cfe,tfa,codegen,opt", "--minify", - "-O4", ] - } else { - args += [ "-O2" ] } args += [ + "-O2", rebase_path(main_dart, root_build_dir), rebase_path(output, root_build_dir), ]