Skip to content

Commit d6949a1

Browse files
committed
add ignore-cross-compile to run-make test
1 parent 41afd5f commit d6949a1

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • tests/run-make/naked-dead-code-elimination

tests/run-make/naked-dead-code-elimination/rmake.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1+
//@ ignore-cross-compile
12
//@ needs-asm-support
23

34
use run_make_support::symbols::object_contains_any_symbol;
45
use run_make_support::{bin_name, rustc};
56

67
fn main() {
8+
rustc().input("main.rs").opt().function_sections(false).run();
9+
check();
10+
711
rustc().input("main.rs").opt().function_sections(true).run();
12+
check();
13+
}
814

15+
fn check() {
916
let bin = bin_name("main");
1017

18+
assert!(object_contains_any_symbol(&bin, &["used"]));
19+
1120
// Check that the naked symbol is eliminated when the "clothed" one is.
1221

1322
assert_eq!(

0 commit comments

Comments
 (0)