about summary refs log tree commit diff
path: root/tests/run-make/no-duplicate-libs/main.rs
blob: d8d5d58bc477a19913823ebdfc36516395cae754 (plain)
1
2
3
4
5
6
7
8
9
10
#[link(name = "foo", kind = "static")] // linker should drop this library, no symbols used
#[link(name = "bar", kind = "static")] // symbol comes from this library
#[link(name = "foo", kind = "static")] // now linker picks up `foo` b/c `bar` library needs it
extern "C" {
    fn bar();
}

fn main() {
    unsafe { bar() }
}