We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cddb15 commit e45d72dCopy full SHA for e45d72d
tests/run-make/target-cpu-native/Makefile
tests/run-make/target-cpu-native/rmake.rs
@@ -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