2024-05-21 13:53:50 -05:00
|
|
|
// A bug from 2015 would cause errors when emitting multiple types of files
|
2024-05-21 14:52:00 -05: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 13:53:50 -05: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 14:52:00 -05:00
|
|
|
rustc().opt_level(level).emit("llvm-bc,llvm-ir,asm,obj,link").input("test-24876.rs").run();
|
2024-05-21 13:53:50 -05:00
|
|
|
}
|
|
|
|
for level in opt_levels {
|
2024-05-21 14:52:00 -05:00
|
|
|
rustc().opt_level(level).emit("llvm-bc,llvm-ir,asm,obj,link").input("test-26235.rs").run();
|
2024-05-21 13:53:50 -05:00
|
|
|
run("test-26235");
|
|
|
|
}
|
|
|
|
}
|