Skip to content

Commit 1e3e3df

Browse files
committed
rewrite emit test
1 parent 7feb191 commit 1e3e3df

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

tests/run-make/emit/Makefile

-22
This file was deleted.

tests/run-make/emit/rmake.rs

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// A bug from 2015 would cause errors when emitting multiple types of files
2+
// in the same rustc call. A fix was created in #30452. This test checks that
3+
// the fix did not accidentally break compilation.
4+
// See https://github.com/rust-lang/rust/pull/30452
5+
6+
//@ ignore-cross-compile
7+
8+
use run_make_support::{run, rustc};
9+
10+
fn main() {
11+
let opt_levels = ["0", "1", "2", "3", "s", "z"];
12+
for level in opt_levels {
13+
rustc().opt_level(level).emit("llvm-bc,llvm-ir,asm,obj,link").input("test-24876.rs");
14+
}
15+
for level in opt_levels {
16+
rustc().opt_level(level).emit("llvm-bc,llvm-ir,asm,obj,link").input("test-26235.rs");
17+
run("test-26235");
18+
}
19+
}

0 commit comments

Comments
 (0)