2024-06-13 15:19:59 -05:00
|
|
|
// 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
|
|
|
|
|
2024-07-17 08:31:38 -05:00
|
|
|
use run_make_support::{rfs, rustc, static_lib_name};
|
2024-06-13 15:19:59 -05:00
|
|
|
|
|
|
|
fn main() {
|
2024-07-17 07:42:06 -05:00
|
|
|
rfs::create_file(static_lib_name("foo"));
|
2024-06-13 15:19:59 -05:00
|
|
|
rustc()
|
|
|
|
.arg("-")
|
|
|
|
.crate_type("rlib")
|
|
|
|
.arg("-lstatic=foo")
|
|
|
|
.run_fail()
|
|
|
|
.assert_stderr_contains("failed to add native library");
|
|
|
|
}
|