rewrite extern-fn-generic to rmake

This commit is contained in:
Oneirical 2024-07-12 15:24:18 -04:00
parent 1a4fba5eb0
commit 8a09f2231d
3 changed files with 15 additions and 8 deletions

View File

@ -20,7 +20,6 @@ run-make/emit-to-stdout/Makefile
run-make/export-executable-symbols/Makefile
run-make/extern-diff-internal-name/Makefile
run-make/extern-flag-disambiguates/Makefile
run-make/extern-fn-generic/Makefile
run-make/extern-fn-reachable/Makefile
run-make/extern-fn-with-union/Makefile
run-make/extern-multiple-copies/Makefile

View File

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

View File

@ -0,0 +1,15 @@
// Generic types in foreign-function interfaces were introduced in #15831 - this
// test simply runs a Rust program containing generics that is also reliant on
// a C library, and checks that compilation and execution are successful.
// See https://github.com/rust-lang/rust/pull/15831
//@ 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("testcrate.rs").run();
rustc().input("test.rs").run();
run("test");
}