Files
rust/tests/ui/linkage-attr/raw-dylib/windows/invalid-dlltool.rs

15 lines
348 B
Rust
Raw Normal View History

// Tests that failing to run dlltool will raise an error.
//@ needs-dlltool
2024-11-28 18:43:56 +01:00
//@ compile-flags: --crate-type lib --emit link -Cdlltool=does_not_exist.exe
#[link(name = "foo", kind = "raw-dylib")]
extern "C" {
fn f(x: i32);
}
pub fn lib_main() {
unsafe { f(42); }
}
//~? ERROR Error calling dlltool 'does_not_exist.exe': program not found