rewrite extern-fn-struct-passing-abi to rmake
This commit is contained in:
parent
a795d8998d
commit
d6a3f65db0
@ -28,7 +28,6 @@ run-make/extern-fn-explicit-align/Makefile
|
||||
run-make/extern-fn-generic/Makefile
|
||||
run-make/extern-fn-mangle/Makefile
|
||||
run-make/extern-fn-reachable/Makefile
|
||||
run-make/extern-fn-struct-passing-abi/Makefile
|
||||
run-make/extern-fn-with-packed-struct/Makefile
|
||||
run-make/extern-fn-with-union/Makefile
|
||||
run-make/extern-multiple-copies/Makefile
|
||||
|
@ -1,6 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
all: $(call NATIVE_STATICLIB,test)
|
||||
$(RUSTC) test.rs
|
||||
$(call RUN,test) || exit 1
|
16
tests/run-make/extern-fn-struct-passing-abi/rmake.rs
Normal file
16
tests/run-make/extern-fn-struct-passing-abi/rmake.rs
Normal file
@ -0,0 +1,16 @@
|
||||
// Functions with more than 6 arguments using foreign function interfaces (FFI) with C libraries
|
||||
// would have their arguments unexpectedly swapped, causing unexpected behaviour in Rust-C FFI
|
||||
// programs. This test compiles and executes Rust code with bulky functions of up to 7 arguments
|
||||
// and uses assertions to check for unexpected swaps.
|
||||
// See https://github.com/rust-lang/rust/issues/25594
|
||||
|
||||
//@ ignore-cross-compile
|
||||
// Reason: the compiled binary is executed
|
||||
|
||||
use run_make_support::{build_native_static_lib, run, rustc};
|
||||
|
||||
fn main() {
|
||||
build_native_static_lib("test");
|
||||
rustc().input("test.rs").run();
|
||||
run("test");
|
||||
}
|
Loading…
Reference in New Issue
Block a user