How to compile rust crate using `-Zpanic-in-drop=abort`?

79 Views Asked by At

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?

0

There are 0 best solutions below