Skip to content

Commit

Permalink
Rollup merge of #126186 - GuillaumeGomez:migrate-run-make-multiple-em…
Browse files Browse the repository at this point in the history
…its, r=jieyouxu

Migrate `run-make/multiple-emits` to `rmake.rs`

Part of #121876.

r? `@jieyouxu`
  • Loading branch information
jieyouxu authored Jun 11, 2024
2 parents 6a207f4 + e8b04cc commit dea5237
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
5 changes: 5 additions & 0 deletions src/tools/run-make-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ pub fn htmldocck() -> Command {
python
}

/// Returns the path for a local test file.
pub fn path<P: AsRef<Path>>(p: P) -> PathBuf {
cwd().join(p.as_ref())
}

/// Path to the root rust-lang/rust source checkout.
pub fn source_root() -> PathBuf {
env_var("SOURCE_ROOT").into()
Expand Down
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 @@ -144,7 +144,6 @@ run-make/mismatching-target-triples/Makefile
run-make/missing-crate-dependency/Makefile
run-make/mixing-libs/Makefile
run-make/msvc-opt-minsize/Makefile
run-make/multiple-emits/Makefile
run-make/native-link-modifier-bundle/Makefile
run-make/native-link-modifier-verbatim-linker/Makefile
run-make/native-link-modifier-verbatim-rustc/Makefile
Expand Down
7 changes: 0 additions & 7 deletions tests/run-make/multiple-emits/Makefile

This file was deleted.

13 changes: 13 additions & 0 deletions tests/run-make/multiple-emits/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use run_make_support::{cwd, path, rustc};

fn main() {
rustc().input("foo.rs").emit("asm,llvm-ir").output("out").run();

assert!(path("out.ll").is_file());
assert!(path("out.s").is_file());

rustc().input("foo.rs").emit("asm,llvm-ir").output("out2.ext").run();

assert!(path("out2.ll").is_file());
assert!(path("out2.s").is_file());
}

0 comments on commit dea5237

Please sign in to comment.