This patch changes how to specify ABI and link name of a native module.
Before:
native "cdecl" mod llvm = "rustllvm" {...}
After:
#[abi = "cdecl"]
#[link_name = "rustllvm"]
native mod llvm {...}
The old optional syntax for ABI and link name is no longer supported.
Fixes issue #547
19 lines
370 B
Rust
19 lines
370 B
Rust
// xfail-fast - Somehow causes check-fast to livelock?? Probably because we're
|
|
// calling pin_task and that's having wierd side-effects.
|
|
|
|
#[abi = "cdecl"]
|
|
#[link_name = "rustrt"]
|
|
native mod rustrt1 {
|
|
fn pin_task();
|
|
}
|
|
|
|
#[abi = "cdecl"]
|
|
#[link_name = "rustrt"]
|
|
native mod rustrt2 {
|
|
fn pin_task();
|
|
}
|
|
|
|
fn main() {
|
|
rustrt1::pin_task();
|
|
rustrt2::pin_task();
|
|
}
|