Skip to content

Commit 946c47c

Browse files
committed
rewrite invalid-staticlib to rmake
1 parent 521edcd commit 946c47c

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ run-make/interdependent-c-libraries/Makefile
7777
run-make/intrinsic-unreachable/Makefile
7878
run-make/invalid-library/Makefile
7979
run-make/invalid-so/Makefile
80-
run-make/invalid-staticlib/Makefile
8180
run-make/issue-107094/Makefile
8281
run-make/issue-10971-temps-dir/Makefile
8382
run-make/issue-109934-lto-debuginfo/Makefile
@@ -98,7 +97,6 @@ run-make/issue-40535/Makefile
9897
run-make/issue-47384/Makefile
9998
run-make/issue-47551/Makefile
10099
run-make/issue-51671/Makefile
101-
run-make/issue-64153/Makefile
102100
run-make/issue-68794-textrel-on-minimal-lib/Makefile
103101
run-make/issue-69368/Makefile
104102
run-make/issue-83045/Makefile

tests/run-make/invalid-staticlib/Makefile

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// If the static library provided is not valid (in this test,
2+
// created as an empty file),
3+
// rustc should print a normal error message and not throw
4+
// an internal compiler error (ICE).
5+
// See https://github.com/rust-lang/rust/pull/28673
6+
7+
use run_make_support::{fs_wrapper, rustc, static_lib_name};
8+
9+
fn main() {
10+
fs_wrapper::create_file(static_lib_name("foo"));
11+
rustc()
12+
.arg("-")
13+
.crate_type("rlib")
14+
.arg("-lstatic=foo")
15+
.run_fail()
16+
.assert_stderr_contains("failed to add native library");
17+
}

0 commit comments

Comments
 (0)