Skip to content

Commit

Permalink
rewrite invalid-staticlib to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 14, 2024
1 parent ff82e43 commit cabc982
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ run-make/interdependent-c-libraries/Makefile
run-make/intrinsic-unreachable/Makefile
run-make/invalid-library/Makefile
run-make/invalid-so/Makefile
run-make/invalid-staticlib/Makefile
run-make/issue-107094/Makefile
run-make/issue-10971-temps-dir/Makefile
run-make/issue-109934-lto-debuginfo/Makefile
Expand All @@ -96,7 +95,6 @@ run-make/issue-40535/Makefile
run-make/issue-47384/Makefile
run-make/issue-47551/Makefile
run-make/issue-51671/Makefile
run-make/issue-64153/Makefile
run-make/issue-68794-textrel-on-minimal-lib/Makefile
run-make/issue-69368/Makefile
run-make/issue-83045/Makefile
Expand Down
5 changes: 0 additions & 5 deletions tests/run-make/invalid-staticlib/Makefile

This file was deleted.

17 changes: 17 additions & 0 deletions tests/run-make/invalid-staticlib/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// If the static library provided is not valid (in this test,
// created as an empty file),
// rustc should print a normal error message and not throw
// an internal compiler error (ICE).
// See https://github.com/rust-lang/rust/pull/28673

use run_make_support::{fs_wrapper, rustc, static_lib_name};

fn main() {
fs_wrapper::create_file(static_lib_name("foo"));
rustc()
.arg("-")
.crate_type("rlib")
.arg("-lstatic=foo")
.run_fail()
.assert_stderr_contains("failed to add native library");
}

0 comments on commit cabc982

Please sign in to comment.