Skip to content

Commit e45d72d

Browse files
committed
rewrite target-cpu-native to rmake
1 parent 5cddb15 commit e45d72d

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

tests/run-make/target-cpu-native/Makefile

-20
This file was deleted.
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// target-cpu is a codegen flag that generates code for the processor of the host machine
2+
// running the compilation. This test is a sanity test that this flag does not cause any
3+
// warnings when used, and that binaries produced by it can also be successfully executed.
4+
// See https://github.com/rust-lang/rust/pull/23238
5+
6+
// FIXME(Oneirical): only-linux only-x86_64
7+
8+
use run_make_support::{run, rustc};
9+
10+
fn main() {
11+
let out = rustc().input("foo.rs").arg("-Ctarget-cpu=native").run().stderr_utf8();
12+
run("foo");
13+
// There should be zero warnings emitted - the bug would cause "unknown CPU `native`"
14+
// to be printed out.
15+
assert_eq!(out.len(), 0);
16+
}

0 commit comments

Comments
 (0)