Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit db2ea96

Browse files
authoredJun 11, 2024
Unrolled build for rust-lang#126186
Rollup merge of rust-lang#126186 - GuillaumeGomez:migrate-run-make-multiple-emits, r=jieyouxu Migrate `run-make/multiple-emits` to `rmake.rs` Part of rust-lang#121876. r? `@jieyouxu`
2 parents 20ba13c + e8b04cc commit db2ea96

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed
 

‎src/tools/run-make-support/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ pub fn htmldocck() -> Command {
8282
python
8383
}
8484

85+
/// Returns the path for a local test file.
86+
pub fn path<P: AsRef<Path>>(p: P) -> PathBuf {
87+
cwd().join(p.as_ref())
88+
}
89+
8590
/// Path to the root rust-lang/rust source checkout.
8691
pub fn source_root() -> PathBuf {
8792
env_var("SOURCE_ROOT").into()

‎src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ run-make/mismatching-target-triples/Makefile
144144
run-make/missing-crate-dependency/Makefile
145145
run-make/mixing-libs/Makefile
146146
run-make/msvc-opt-minsize/Makefile
147-
run-make/multiple-emits/Makefile
148147
run-make/native-link-modifier-bundle/Makefile
149148
run-make/native-link-modifier-verbatim-linker/Makefile
150149
run-make/native-link-modifier-verbatim-rustc/Makefile

‎tests/run-make/multiple-emits/Makefile

-7
This file was deleted.
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
use run_make_support::{cwd, path, rustc};
2+
3+
fn main() {
4+
rustc().input("foo.rs").emit("asm,llvm-ir").output("out").run();
5+
6+
assert!(path("out.ll").is_file());
7+
assert!(path("out.s").is_file());
8+
9+
rustc().input("foo.rs").emit("asm,llvm-ir").output("out2.ext").run();
10+
11+
assert!(path("out2.ll").is_file());
12+
assert!(path("out2.s").is_file());
13+
}

0 commit comments

Comments
 (0)
Failed to load comments.