diff --git a/Cargo.lock b/Cargo.lock index deb6ad6..2dadcce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "catch_std_exception" @@ -33,6 +33,13 @@ version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +[[package]] +name = "panic_abort_no_debuginfo" +version = "0.1.0" +dependencies = [ + "unwinding", +] + [[package]] name = "rustc-std-workspace-alloc" version = "1.0.0" diff --git a/Cargo.toml b/Cargo.toml index d3e3161..1246a44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,7 @@ members = [ "test_crates/throw_and_catch", "test_crates/catch_std_exception", "test_crates/std_catch_exception", + "test_crates/panic_abort_no_debuginfo", ] [dependencies] diff --git a/test_crates/panic_abort_no_debuginfo/Cargo.toml b/test_crates/panic_abort_no_debuginfo/Cargo.toml new file mode 100644 index 0000000..1e8b5c6 --- /dev/null +++ b/test_crates/panic_abort_no_debuginfo/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "panic_abort_no_debuginfo" +version = "0.1.0" +edition = "2021" + +[dependencies] +unwinding = { path = "../../", features = ["panic"] } diff --git a/test_crates/panic_abort_no_debuginfo/check.sh b/test_crates/panic_abort_no_debuginfo/check.sh new file mode 100755 index 0000000..b5a2fda --- /dev/null +++ b/test_crates/panic_abort_no_debuginfo/check.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -o pipefail +RUSTFLAGS="-Cpanic=abort -Cdebuginfo=0" ${CARGO:-cargo} run --release $BUILD_STD 2>&1 diff --git a/test_crates/panic_abort_no_debuginfo/src/main.rs b/test_crates/panic_abort_no_debuginfo/src/main.rs new file mode 100644 index 0000000..6a29a05 --- /dev/null +++ b/test_crates/panic_abort_no_debuginfo/src/main.rs @@ -0,0 +1,3 @@ +extern crate unwinding; + +fn main() {} diff --git a/tests/compile_tests.rs b/tests/compile_tests.rs index 26a5697..d672a05 100644 --- a/tests/compile_tests.rs +++ b/tests/compile_tests.rs @@ -8,6 +8,7 @@ fn main() { "throw_and_catch", "catch_std_exception", "std_catch_exception", + "panic_abort_no_debuginfo", ]; for test in tests {