Skip to content

Commit bb88dc0

Browse files
authored
Unrolled build for rust-lang#125849
Rollup merge of rust-lang#125849 - GuillaumeGomez:migrate-emit-named-files, r=jieyouxu Migrate `run-make/emit-named-files` to `rmake.rs` Part of rust-lang#121876. r? `@jieyouxu`
2 parents 8bec878 + 190a96f commit bb88dc0

File tree

3 files changed

+25
-34
lines changed

3 files changed

+25
-34
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ run-make/dump-ice-to-disk/Makefile
3737
run-make/dump-mono-stats/Makefile
3838
run-make/duplicate-output-flavors/Makefile
3939
run-make/dylib-chain/Makefile
40-
run-make/emit-named-files/Makefile
4140
run-make/emit-path-unhashed/Makefile
4241
run-make/emit-shared-files/Makefile
4342
run-make/emit-stack-sizes/Makefile

tests/run-make/emit-named-files/Makefile

-33
This file was deleted.
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
use std::fs::create_dir;
2+
use std::path::Path;
3+
4+
use run_make_support::{rustc, tmp_dir};
5+
6+
fn emit_and_check(out_dir: &Path, out_file: &str, format: &str) {
7+
let out_file = out_dir.join(out_file);
8+
rustc().input("foo.rs").emit(&format!("{format}={}", out_file.display())).run();
9+
assert!(out_file.is_file());
10+
}
11+
12+
fn main() {
13+
let out_dir = tmp_dir().join("emit");
14+
15+
create_dir(&out_dir).unwrap();
16+
17+
emit_and_check(&out_dir, "libfoo.s", "asm");
18+
emit_and_check(&out_dir, "libfoo.bc", "llvm-bc");
19+
emit_and_check(&out_dir, "libfoo.ll", "llvm-ir");
20+
emit_and_check(&out_dir, "libfoo.o", "obj");
21+
emit_and_check(&out_dir, "libfoo.rmeta", "metadata");
22+
emit_and_check(&out_dir, "libfoo.rlib", "link");
23+
emit_and_check(&out_dir, "libfoo.d", "dep-info");
24+
emit_and_check(&out_dir, "libfoo.mir", "mir");
25+
}

0 commit comments

Comments
 (0)