diff --git a/src/cmd/build.rs b/src/cmd/build.rs index c43f90063f0f8998444c90da2bdb3e0842dde2be..61a32fd2ee74036a54121ac757b89f483d766b9f 100644 --- a/src/cmd/build.rs +++ b/src/cmd/build.rs @@ -210,13 +210,14 @@ fn exec_cargo_for_wasm_target( let mut args = vec![ "--target=wasm32-unknown-unknown", "-Zbuild-std", - "-Zbuild-std-features=panic_immediate_abort", "--no-default-features", "--release", &target_dir, ]; if build_mode == BuildMode::Debug { args.push("--features=ink_env/ink-debug"); + } else { + args.push("-Zbuild-std-features=panic_immediate_abort"); } util::invoke_cargo(command, &args, manifest_path.directory(), verbosity)?; @@ -743,7 +744,7 @@ mod tests_ci_only { let res = super::execute( &manifest_path, Verbosity::Default, - BuildMode::default(), + BuildMode::Release, BuildArtifacts::CodeOnly, UnstableFlags::default(), OptimizationPasses::default(),