rewrite extern-fn-mangle to rmake
This commit is contained in:
parent
f7d67d6b68
commit
c68d25b097
@ -25,7 +25,6 @@ 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-mangle/Makefile
|
||||
run-make/extern-fn-reachable/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-mangle/rmake.rs
Normal file
16
tests/run-make/extern-fn-mangle/rmake.rs
Normal file
@ -0,0 +1,16 @@
|
||||
// In this test, the functions foo() and bar() must avoid being mangled, as
|
||||
// the external C function depends on them to return the correct sum of 3 + 5 = 8.
|
||||
// This test therefore checks that the compiled and executed program respects the
|
||||
// #[no_mangle] flags successfully.
|
||||
// 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("test.rs").run();
|
||||
run("test");
|
||||
}
|
Loading…
Reference in New Issue
Block a user