Skip to content

Commit

Permalink
Rewrite ls-metadata to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 9, 2024
1 parent 196ce37 commit 87ae390
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
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 @@ -125,7 +125,6 @@ run-make/llvm-outputs/Makefile
run-make/long-linker-command-lines-cmd-exe/Makefile
run-make/long-linker-command-lines/Makefile
run-make/longjmp-across-rust/Makefile
run-make/ls-metadata/Makefile
run-make/lto-dylib-dep/Makefile
run-make/lto-empty/Makefile
run-make/lto-linkage-used-attr/Makefile
Expand Down
8 changes: 0 additions & 8 deletions tests/run-make/ls-metadata/Makefile

This file was deleted.

17 changes: 17 additions & 0 deletions tests/run-make/ls-metadata/rmake.rs
Original file line number Diff line number Diff line change
@@ -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"));
}

0 comments on commit 87ae390

Please sign in to comment.