rust/tests/run-make/emit/rmake.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
745 B
Rust
Raw Normal View History

2024-05-21 18:53:50 +00:00
// A bug from 2015 would cause errors when emitting multiple types of files
2024-05-21 19:52:00 +00:00
// in the same rustc call. A fix was created in #30452. This test checks that rustc still compiles
// a source file successfully when emission of multiple output artifacts are requested.
2024-05-21 18:53:50 +00:00
// See https://github.com/rust-lang/rust/pull/30452
//@ ignore-cross-compile
use run_make_support::{run, rustc};
fn main() {
let opt_levels = ["0", "1", "2", "3", "s", "z"];
for level in opt_levels {
2024-05-21 19:52:00 +00:00
rustc().opt_level(level).emit("llvm-bc,llvm-ir,asm,obj,link").input("test-24876.rs").run();
2024-05-21 18:53:50 +00:00
}
for level in opt_levels {
2024-05-21 19:52:00 +00:00
rustc().opt_level(level).emit("llvm-bc,llvm-ir,asm,obj,link").input("test-26235.rs").run();
2024-05-21 18:53:50 +00:00
run("test-26235");
}
}