Skip to content

Commit 7b37e2b

Browse files
committed
rewrite panic-abort-eh_frame to rmake
1 parent 4fa2a9b commit 7b37e2b

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ run-make/no-alloc-shim/Makefile
9595
run-make/no-builtins-attribute/Makefile
9696
run-make/no-duplicate-libs/Makefile
9797
run-make/obey-crate-type-flag/Makefile
98-
run-make/panic-abort-eh_frame/Makefile
9998
run-make/pass-non-c-like-enum-to-c/Makefile
10099
run-make/pdb-buildinfo-cl-cmd/Makefile
101100
run-make/pgo-gen-lto/Makefile

tests/run-make/panic-abort-eh_frame/Makefile

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// An `.eh_frame` section in an object file is a symptom of an UnwindAction::Terminate
2+
// being inserted, useful for determining whether or not unwinding is necessary.
3+
// This is useless when panics would NEVER unwind due to -C panic=abort. This section should
4+
// therefore never appear in the emit file of a -C panic=abort compilation, and this test
5+
// checks that this is respected.
6+
// See https://github.com/rust-lang/rust/pull/112403
7+
8+
// FIXME(Oneirical): try it on more than only-linux!
9+
10+
use run_make_support::{llvm_objdump, rustc};
11+
12+
fn main() {
13+
rustc()
14+
.input("foo.rs")
15+
.crate_type("lib")
16+
.emit("obj=foo.o")
17+
.panic("abort")
18+
.edition("2021")
19+
.arg("-Zvalidate-mir")
20+
.run();
21+
llvm_objdump().arg("--dwarf=frames").input("foo.o").run().assert_stdout_not_contains("DW_CFA");
22+
}

0 commit comments

Comments
 (0)