Skip to content

Commit f0b8da4

Browse files
committed
rewrite no-intermediate-extras
1 parent ddba1dc commit f0b8da4

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ run-make/no-alloc-shim/Makefile
179179
run-make/no-builtins-attribute/Makefile
180180
run-make/no-builtins-lto/Makefile
181181
run-make/no-duplicate-libs/Makefile
182-
run-make/no-intermediate-extras/Makefile
183182
run-make/obey-crate-type-flag/Makefile
184183
run-make/optimization-remarks-dir-pgo/Makefile
185184
run-make/optimization-remarks-dir/Makefile

tests/run-make/no-intermediate-extras/Makefile

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// When using the --test flag with an rlib, this used to generate
2+
// an unwanted .bc file, which should not exist. This test checks
3+
// that the bug causing the generation of this file has not returned.
4+
// See https://github.com/rust-lang/rust/issues/10973
5+
6+
//@ ignore-cross-compile
7+
8+
use run_make_support::{rustc, tmp_dir};
9+
10+
fn main() {
11+
rustc().crate_type("rlib").arg("--test").input("foo.rs").run();
12+
match fs::remove_file(tmp_dir().join("foo.bc")) {
13+
Ok(_) => {
14+
println!("An unwanted .bc file was created by run-make/no-intermediate-extras.");
15+
std::process::exit(0);
16+
},
17+
Err(e) => {
18+
std::process::exit(1);
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)