rewrite mixing-deps in rmake

This commit is contained in:
Oneirical 2024-05-27 21:10:57 -04:00
parent d9d013bec0
commit 634270e8da
4 changed files with 15 additions and 9 deletions

View File

@ -156,7 +156,6 @@ run-make/min-global-align/Makefile
run-make/mingw-export-call-convention/Makefile run-make/mingw-export-call-convention/Makefile
run-make/mismatching-target-triples/Makefile run-make/mismatching-target-triples/Makefile
run-make/missing-crate-dependency/Makefile run-make/missing-crate-dependency/Makefile
run-make/mixing-deps/Makefile
run-make/mixing-formats/Makefile run-make/mixing-formats/Makefile
run-make/mixing-libs/Makefile run-make/mixing-libs/Makefile
run-make/msvc-opt-minsize/Makefile run-make/msvc-opt-minsize/Makefile

View File

@ -4,6 +4,8 @@
//@ ignore-cross-compile //@ ignore-cross-compile
use run_make_support::rustc;
fn main() { fn main() {
let lto_flags = ["-Clto", "-Clto=yes", "-Clto=off", "-Clto=thin", "-Clto=fat"]; let lto_flags = ["-Clto", "-Clto=yes", "-Clto=off", "-Clto=thin", "-Clto=fat"];
for flag in lto_flags { for flag in lto_flags {

View File

@ -1,8 +0,0 @@
# ignore-cross-compile
include ../tools.mk
all:
$(RUSTC) both.rs -C prefer-dynamic
$(RUSTC) dylib.rs -C prefer-dynamic
$(RUSTC) prog.rs
$(call RUN,prog)

View File

@ -0,0 +1,13 @@
// This test invokes the main function in prog.rs, which has dependencies
// in both an rlib and a dylib. This test checks that these different library
// types can be successfully mixed.
//@ ignore-cross-compile
use run_make_support::{run, rustc};
fn main() {
rustc().input("both.rs").arg("-Cprefer-dynamic").run();
rustc().input("dylib.rs").arg("-Cprefer-dynamic").run();
rustc().input("prog.rs").run();
run("prog");
}