From 0bd2629dd2be4f407d7f1dc36ac03d2970767554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Thu, 12 Aug 2021 13:49:39 +0200 Subject: [PATCH 1/2] Do not strip out panic messages in debug builds --- src/cmd/build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/build.rs b/src/cmd/build.rs index c43f90063..5d5e44cd6 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)?; From f07900a945490c389df6e97f1a497ad8a0ede571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Thu, 12 Aug 2021 15:10:57 +0200 Subject: [PATCH 2/2] Build code_only test in release mode --- src/cmd/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/build.rs b/src/cmd/build.rs index 5d5e44cd6..61a32fd2e 100644 --- a/src/cmd/build.rs +++ b/src/cmd/build.rs @@ -744,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(),