Skip to content

Commit 671ffd5

Browse files
committed
Rewrite ls-metadata to rmake
1 parent 50e5f51 commit 671ffd5

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ run-make/llvm-ident/Makefile
124124
run-make/long-linker-command-lines-cmd-exe/Makefile
125125
run-make/long-linker-command-lines/Makefile
126126
run-make/longjmp-across-rust/Makefile
127-
run-make/ls-metadata/Makefile
128127
run-make/lto-dylib-dep/Makefile
129128
run-make/lto-empty/Makefile
130129
run-make/lto-linkage-used-attr/Makefile

tests/run-make/ls-metadata/Makefile

-8
This file was deleted.

tests/run-make/ls-metadata/rmake.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Passing invalid files to -Z ls (which lists the symbols
2+
// defined by a library crate) used to cause a segmentation fault.
3+
// As this was fixed in #11262, this test checks that no segfault
4+
// occurs when passing the invalid file `bar` to -Z ls.
5+
// See https://github.com/rust-lang/rust/issues/11259
6+
7+
//@ ignore-cross-compile
8+
9+
use run_make_support::fs_wrapper;
10+
use run_make_support::{rmake_out_path, rustc};
11+
12+
fn main() {
13+
rustc().input("foo.rs");
14+
rustc().arg("-Zls=root").input(rmake_out_path("foo"));
15+
fs_wrapper::create_file(rmake_out_path("bar"));
16+
rustc().arg("-Zls=root").input(rmake_out_path("bar"));
17+
}

0 commit comments

Comments
 (0)