rewrite extern-fn-with-extern-types to rmake

This commit is contained in:
Oneirical 2024-07-08 13:42:46 -04:00
parent f00f850919
commit a47ca19134
3 changed files with 16 additions and 7 deletions

View File

@ -29,7 +29,6 @@ run-make/extern-fn-generic/Makefile
run-make/extern-fn-mangle/Makefile run-make/extern-fn-mangle/Makefile
run-make/extern-fn-reachable/Makefile run-make/extern-fn-reachable/Makefile
run-make/extern-fn-struct-passing-abi/Makefile run-make/extern-fn-struct-passing-abi/Makefile
run-make/extern-fn-with-extern-types/Makefile
run-make/extern-fn-with-packed-struct/Makefile run-make/extern-fn-with-packed-struct/Makefile
run-make/extern-fn-with-union/Makefile run-make/extern-fn-with-union/Makefile
run-make/extern-multiple-copies/Makefile run-make/extern-multiple-copies/Makefile

View File

@ -1,6 +0,0 @@
# ignore-cross-compile
include ../tools.mk
all: $(call NATIVE_STATICLIB,ctest)
$(RUSTC) test.rs
$(call RUN,test) || exit 1

View File

@ -0,0 +1,16 @@
// This test checks the functionality of foreign function interface (FFI) where Rust
// must call upon a C library defining functions, where these functions also use custom
// types defined by the C file. In addition to compilation being successful, the binary
// should also successfully execute.
// See https://github.com/rust-lang/rust/pull/44295
//@ 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("ctest");
rustc().input("test.rs").run();
run("test");
}