rust/tests/run-make-fulldeps/no-duplicate-libs/main.rs
2023-01-11 09:32:08 +00:00

11 lines
273 B
Rust

#[link(name = "foo")] // linker should drop this library, no symbols used
#[link(name = "bar")] // symbol comes from this library
#[link(name = "foo")] // now linker picks up `foo` b/c `bar` library needs it
extern "C" {
fn bar();
}
fn main() {
unsafe { bar() }
}