-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite c-unwind-abi-catch-panic to rmake
- Loading branch information
Showing
3 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
} |