Skip to content

Commit

Permalink
Do not strip out panic messages in debug builds (#326)
Browse files Browse the repository at this point in the history
* Do not strip out panic messages in debug builds

* Build code_only test in release mode
  • Loading branch information
athei authored Aug 12, 2021
1 parent 5af44eb commit 7bc6097
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cmd/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;

Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 7bc6097

Please sign in to comment.