rewrite c-dynamic-rlib to rmake
This commit is contained in:
parent
ef07fe1b28
commit
63286d80a1
@ -1,6 +1,5 @@
|
|||||||
run-make/branch-protection-check-IBT/Makefile
|
run-make/branch-protection-check-IBT/Makefile
|
||||||
run-make/c-dynamic-dylib/Makefile
|
run-make/c-dynamic-dylib/Makefile
|
||||||
run-make/c-dynamic-rlib/Makefile
|
|
||||||
run-make/c-unwind-abi-catch-lib-panic/Makefile
|
run-make/c-unwind-abi-catch-lib-panic/Makefile
|
||||||
run-make/cat-and-grep-sanity-check/Makefile
|
run-make/cat-and-grep-sanity-check/Makefile
|
||||||
run-make/cdylib-dylib-linkage/Makefile
|
run-make/cdylib-dylib-linkage/Makefile
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
# This test checks that dynamic Rust linking with C does not encounter any errors, with static dependencies given preference over dynamic. (This is the default behaviour.)
|
|
||||||
# See https://github.com/rust-lang/rust/issues/10434
|
|
||||||
|
|
||||||
# ignore-cross-compile
|
|
||||||
include ../tools.mk
|
|
||||||
|
|
||||||
# ignore-apple
|
|
||||||
#
|
|
||||||
# This hits an assertion in the linker on older versions of osx apparently
|
|
||||||
|
|
||||||
# This overrides the LD_LIBRARY_PATH for RUN
|
|
||||||
TARGET_RPATH_DIR:=$(TARGET_RPATH_DIR):$(TMPDIR)
|
|
||||||
|
|
||||||
all: $(call DYLIB,cfoo)
|
|
||||||
$(RUSTC) foo.rs
|
|
||||||
$(RUSTC) bar.rs
|
|
||||||
$(call RUN,bar)
|
|
||||||
$(call REMOVE_DYLIBS,cfoo)
|
|
||||||
$(call FAIL,bar)
|
|
22
tests/run-make/c-dynamic-rlib/rmake.rs
Normal file
22
tests/run-make/c-dynamic-rlib/rmake.rs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// This test checks that dynamic Rust linking with C does not encounter any errors in both
|
||||||
|
// compilation and execution, with static dependencies given preference over dynamic.
|
||||||
|
// (This is the default behaviour.)
|
||||||
|
// See https://github.com/rust-lang/rust/issues/10434
|
||||||
|
|
||||||
|
//@ ignore-cross-compile
|
||||||
|
// Reason: the compiled binary is executed
|
||||||
|
|
||||||
|
//FIXME(Oneirical): test on apple because older versions of osx are failing apparently
|
||||||
|
|
||||||
|
use run_make_support::{
|
||||||
|
build_native_dynamic_lib, dynamic_lib_name, fs_wrapper, run, run_fail, rustc,
|
||||||
|
};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
build_native_dynamic_lib("cfoo");
|
||||||
|
rustc().input("foo.rs").run();
|
||||||
|
rustc().input("bar.rs").run();
|
||||||
|
run("bar");
|
||||||
|
fs_wrapper::remove_file(dynamic_lib_name("cfoo"));
|
||||||
|
run_fail("bar");
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user