forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite panic-abort-eh_frame to rmake
- Loading branch information
Showing
4 changed files
with
62 additions
and
36 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 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,20 @@ | ||
// An `.eh_frame` section in an object file is a symptom of an UnwindAction::Terminate | ||
// being inserted, useful for determining whether or not unwinding is necessary. | ||
// This is useless when panics would NEVER unwind due to -C panic=abort. This section should | ||
// therefore never appear in the emit file of a -C panic=abort compilation, and this test | ||
// checks that this is respected. | ||
// See https://github.com/rust-lang/rust/pull/112403 | ||
|
||
use run_make_support::{llvm_objdump, rustc}; | ||
|
||
fn main() { | ||
rustc() | ||
.input("foo.rs") | ||
.crate_type("lib") | ||
.emit("obj=foo.o") | ||
.panic("abort") | ||
.edition("2021") | ||
.arg("-Zvalidate-mir") | ||
.run(); | ||
llvm_objdump().arg("--dwarf=frames").input("foo.o").run().assert_stdout_not_contains("DW_CFA"); | ||
} |