Move almost all run-make-fulldeps to run-make
They pass fine.
This commit is contained in:
parent
f2d9a3d077
commit
433da1fc04
696 changed files with 2 additions and 2 deletions
5
tests/run-make/extern-fn-mangle/Makefile
Normal file
5
tests/run-make/extern-fn-mangle/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
include ../tools.mk
|
||||
|
||||
all: $(call NATIVE_STATICLIB,test)
|
||||
$(RUSTC) test.rs
|
||||
$(call RUN,test) || exit 1
|
||||
8
tests/run-make/extern-fn-mangle/test.c
Normal file
8
tests/run-make/extern-fn-mangle/test.c
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include <stdint.h>
|
||||
|
||||
uint32_t foo();
|
||||
uint32_t bar();
|
||||
|
||||
uint32_t add() {
|
||||
return foo() + bar();
|
||||
}
|
||||
19
tests/run-make/extern-fn-mangle/test.rs
Normal file
19
tests/run-make/extern-fn-mangle/test.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#[no_mangle]
|
||||
pub extern "C" fn foo() -> i32 {
|
||||
3
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn bar() -> i32 {
|
||||
5
|
||||
}
|
||||
|
||||
#[link(name = "test", kind = "static")]
|
||||
extern "C" {
|
||||
fn add() -> i32;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let back = unsafe { add() };
|
||||
assert_eq!(8, back);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue