Skip to content

Commit

Permalink
Scream into the void if unwinding is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Sep 15, 2023
1 parent ff0a0e4 commit 5aff1be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ fn main() {
eprintln!("If the build fails, try using wasm32-unknown-emscripten target instead");
}

if cfg!(feature = "unwinding") && env::var_os("CARGO_CFG_PANIC").as_deref() == Some("abort".as_ref()) {
println!("cargo:warning=libjpeg will not be able to gracefully handle errors when used with panic=abort");
}

let _ = fs::create_dir_all(&config_dir);

println!("cargo:include={}", env::join_paths(&[&config_dir, &vendor]).expect("inc").to_str().expect("inc"));
Expand Down

0 comments on commit 5aff1be

Please sign in to comment.