Rewrite ls-metadata to rmake
This commit is contained in:
parent
fa2b612213
commit
594135ea37
3 changed files with 17 additions and 9 deletions
|
@ -108,7 +108,6 @@ run-make/llvm-ident/Makefile
|
||||||
run-make/long-linker-command-lines-cmd-exe/Makefile
|
run-make/long-linker-command-lines-cmd-exe/Makefile
|
||||||
run-make/long-linker-command-lines/Makefile
|
run-make/long-linker-command-lines/Makefile
|
||||||
run-make/longjmp-across-rust/Makefile
|
run-make/longjmp-across-rust/Makefile
|
||||||
run-make/ls-metadata/Makefile
|
|
||||||
run-make/lto-dylib-dep/Makefile
|
run-make/lto-dylib-dep/Makefile
|
||||||
run-make/lto-empty/Makefile
|
run-make/lto-empty/Makefile
|
||||||
run-make/lto-linkage-used-attr/Makefile
|
run-make/lto-linkage-used-attr/Makefile
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# ignore-cross-compile
|
|
||||||
include ../tools.mk
|
|
||||||
|
|
||||||
all:
|
|
||||||
$(RUSTC) foo.rs
|
|
||||||
$(RUSTC) -Z ls=root $(TMPDIR)/foo
|
|
||||||
touch $(TMPDIR)/bar
|
|
||||||
$(RUSTC) -Z ls=root $(TMPDIR)/bar
|
|
17
tests/run-make/ls-metadata/rmake.rs
Normal file
17
tests/run-make/ls-metadata/rmake.rs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
// Passing invalid files to -Z ls (which lists the symbols
|
||||||
|
// defined by a library crate) used to cause a segmentation fault.
|
||||||
|
// As this was fixed in #11262, this test checks that no segfault
|
||||||
|
// occurs when passing the invalid file `bar` to -Z ls.
|
||||||
|
// See https://github.com/rust-lang/rust/issues/11259
|
||||||
|
|
||||||
|
//@ ignore-cross-compile
|
||||||
|
|
||||||
|
use run_make_support::fs_wrapper;
|
||||||
|
use run_make_support::{rmake_out_path, rustc};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
rustc().input("foo.rs");
|
||||||
|
rustc().arg("-Zls=root").input(rmake_out_path("foo"));
|
||||||
|
fs_wrapper::create_file(rmake_out_path("bar"));
|
||||||
|
rustc().arg("-Zls=root").input(rmake_out_path("bar"));
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue