1

Compile Rust crate using -Zpanic-in-drop=abort and build-std options got lots of errors as below:

error: the crate `std` is compiled with the panic-in-drop strategy `unwind` which is incompatible with this crate's strategy of `abort`
error: the crate `core` is compiled with the panic-in-drop strategy `unwind` which is incompatible with this crate's strategy of `abort`
error: the crate `rustc_std_workspace_core` is compiled with the panic-in-drop strategy `unwind` which is incompatible with this crate's strategy of `abort`
error: the crate `alloc` is compiled with the panic-in-drop strategy `unwind` which is incompatible with this crate's strategy of `abort`
error: the crate `libc` is compiled with the panic-in-drop strategy `unwind` which is incompatible with this crate's strategy of `abort`
error: the crate `unwind` is compiled with the panic-in-drop strategy `unwind` which is incompatible with this crate's strategy of `abort`
error: the crate `cfg_if` is compiled with the panic-in-drop strategy `unwind` which is incompatible with this crate's strategy of `abort`

How to change panic-in-drop strategy from unwind to abort?

cafce25
  • 15,907
  • 4
  • 25
  • 31
Larry
  • 155
  • 7
  • Can't reproduce this, can you provide details on how you try to compile? – cafce25 Apr 06 '23 at 13:32
  • For example, using `cargo build -Zbuild-std=core,alloc,std -Zpanic-in-drop=abort`. Or, what is right way to use `-Zpanic-in-drop=abort`? – Larry Apr 06 '23 at 17:44

0 Answers0