Skip to content

Commit

Permalink
Unrolled build for rust-lang#125849
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
rust-timer authored Jun 2, 2024
2 parents 8bec878 + 190a96f commit bb88dc0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 34 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ run-make/dump-ice-to-disk/Makefile
run-make/dump-mono-stats/Makefile
run-make/duplicate-output-flavors/Makefile
run-make/dylib-chain/Makefile
run-make/emit-named-files/Makefile
run-make/emit-path-unhashed/Makefile
run-make/emit-shared-files/Makefile
run-make/emit-stack-sizes/Makefile
Expand Down
33 changes: 0 additions & 33 deletions tests/run-make/emit-named-files/Makefile

This file was deleted.

25 changes: 25 additions & 0 deletions tests/run-make/emit-named-files/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
use std::fs::create_dir;
use std::path::Path;

use run_make_support::{rustc, tmp_dir};

fn emit_and_check(out_dir: &Path, out_file: &str, format: &str) {
let out_file = out_dir.join(out_file);
rustc().input("foo.rs").emit(&format!("{format}={}", out_file.display())).run();
assert!(out_file.is_file());
}

fn main() {
let out_dir = tmp_dir().join("emit");

create_dir(&out_dir).unwrap();

emit_and_check(&out_dir, "libfoo.s", "asm");
emit_and_check(&out_dir, "libfoo.bc", "llvm-bc");
emit_and_check(&out_dir, "libfoo.ll", "llvm-ir");
emit_and_check(&out_dir, "libfoo.o", "obj");
emit_and_check(&out_dir, "libfoo.rmeta", "metadata");
emit_and_check(&out_dir, "libfoo.rlib", "link");
emit_and_check(&out_dir, "libfoo.d", "dep-info");
emit_and_check(&out_dir, "libfoo.mir", "mir");
}

0 comments on commit bb88dc0

Please sign in to comment.