mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
rewrite c-unwind-abi-catch-panic to rmake
This commit is contained in:
parent
7b19389d58
commit
27334943ed
@ -4,7 +4,6 @@ run-make/c-dynamic-rlib/Makefile
|
||||
run-make/c-static-dylib/Makefile
|
||||
run-make/c-static-rlib/Makefile
|
||||
run-make/c-unwind-abi-catch-lib-panic/Makefile
|
||||
run-make/c-unwind-abi-catch-panic/Makefile
|
||||
run-make/cat-and-grep-sanity-check/Makefile
|
||||
run-make/cdylib-dylib-linkage/Makefile
|
||||
run-make/compiler-lookup-paths-2/Makefile
|
||||
|
@ -1,10 +0,0 @@
|
||||
# Exercise unwinding a panic. This catches a panic across an FFI boundary and downcasts it into an integer. The Rust code that panics is in the same directory.
|
||||
# See https://github.com/rust-lang/rust/commit/baf227ea0c1e07fc54395a51e4b3881d701180cb
|
||||
|
||||
# ignore-cross-compile
|
||||
# needs-unwind
|
||||
include ../tools.mk
|
||||
|
||||
all: $(call NATIVE_STATICLIB,add)
|
||||
$(RUSTC) main.rs
|
||||
$(call RUN,main) || exit 1
|
18
tests/run-make/c-unwind-abi-catch-panic/rmake.rs
Normal file
18
tests/run-make/c-unwind-abi-catch-panic/rmake.rs
Normal file
@ -0,0 +1,18 @@
|
||||
// A test for calling `C-unwind` functions across foreign function boundaries (FFI).
|
||||
// This test triggers a panic when calling a foreign function that calls *back* into Rust.
|
||||
// This catches a panic across an FFI boundary and downcasts it into an integer.
|
||||
// The Rust code that panics is in the same directory, unlike `c-unwind-abi-catch-lib-panic`.
|
||||
// See https://github.com/rust-lang/rust/pull/76570
|
||||
|
||||
//@ ignore-cross-compile
|
||||
// Reason: the compiled binary is executed
|
||||
//@ needs-unwind
|
||||
// Reason: this test exercises panic unwinding
|
||||
|
||||
use run_make_support::{build_native_static_lib, run, rustc};
|
||||
|
||||
fn main() {
|
||||
build_native_static_lib("add");
|
||||
rustc().input("main.rs").run();
|
||||
run("main");
|
||||
}
|
Loading…
Reference in New Issue
Block a user