Skip to content

Commit 2ffff79

Browse files
committed
rewrite pretty-print-with-dep-file to rmake
1 parent bae813a commit 2ffff79

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ run-make/pgo-indirect-call-promotion/Makefile
134134
run-make/pgo-use/Makefile
135135
run-make/pointer-auth-link-with-c/Makefile
136136
run-make/pretty-print-to-file/Makefile
137-
run-make/pretty-print-with-dep-file/Makefile
138137
run-make/print-calling-conventions/Makefile
139138
run-make/print-target-list/Makefile
140139
run-make/profile/Makefile

tests/run-make/pretty-print-with-dep-file/Makefile

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Passing --emit=dep-info to the Rust compiler should create a .d file...
2+
// but it failed to do so in Rust 1.69.0 when combined with -Z unpretty=expanded
3+
// due to a bug. This test checks that -Z unpretty=expanded does not prevent the
4+
// generation of the dep-info file, and that its -Z unpretty=normal counterpart
5+
// does not get an unexpected dep-info file.
6+
// See https://github.com/rust-lang/rust/issues/112898
7+
8+
use run_make_support::{fs_wrapper, invalid_utf8_contains, rustc};
9+
use std::path::Path;
10+
11+
fn main() {
12+
rustc().emit("dep-info").arg("-Zunpretty=expanded").input("with-dep.rs").run();
13+
invalid_utf8_contains("with-dep.d", "with-dep.rs");
14+
fs_wrapper::remove_file("with-dep.d");
15+
rustc().emit("dep-info").arg("-Zunpretty=normal").input("with-dep.rs").run();
16+
assert!(!Path::new("with-dep.d").exists());
17+
}

0 commit comments

Comments
 (0)