summaryrefslogtreecommitdiffstats
path: root/tests/run-make/raw-dylib-cross-compilation/lib.rs
blob: 51bf2ec6b6e11423c92edfd00606835fdcb96005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![feature(raw_dylib)]
#![feature(no_core, lang_items)]
#![no_std]
#![no_core]
#![crate_type = "lib"]

// This is needed because of #![no_core]:
#[lang = "sized"]
trait Sized {}

#[link(name = "extern_1", kind = "raw-dylib")]
extern {
    fn extern_fn();
}

pub fn extern_fn_caller() {
    unsafe {
        extern_fn();
    }
}