summaryrefslogtreecommitdiffstats
path: root/tests/run-make/link-path-order/main.rs
blob: 8024e343d19a74fdad927c1d898958a92505bf46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(rustc_private)]

extern crate libc;

#[link(name = "foo", kind = "static")]
extern "C" {
    fn should_return_one() -> libc::c_int;
}

fn main() {
    let result = unsafe { should_return_one() };

    if result != 1 {
        std::process::exit(255);
    }
}