Skip to content

Commit 85fd830

Browse files
committed
rewrite extern-fn-mangle to rmake
1 parent e66819a commit 85fd830

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ run-make/extern-diff-internal-name/Makefile
3030
run-make/extern-flag-disambiguates/Makefile
3131
run-make/extern-flag-pathless/Makefile
3232
run-make/extern-fn-generic/Makefile
33-
run-make/extern-fn-mangle/Makefile
3433
run-make/extern-fn-reachable/Makefile
3534
run-make/extern-fn-with-union/Makefile
3635
run-make/extern-multiple-copies/Makefile

tests/run-make/extern-fn-mangle/Makefile

-6
This file was deleted.
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// In this test, the functions foo() and bar() must avoid being mangled, as
2+
// the external C function depends on them to return the correct sum of 3 + 5 = 8.
3+
// This test therefore checks that the compiled and executed program respects the
4+
// #[no_mangle] flags successfully.
5+
// See https://github.com/rust-lang/rust/pull/15831
6+
7+
//@ ignore-cross-compile
8+
// Reason: the compiled binary is executed
9+
10+
use run_make_support::{build_native_static_lib, run, rustc};
11+
12+
fn main() {
13+
build_native_static_lib("test");
14+
rustc().input("test.rs").run();
15+
run("test");
16+
}

0 commit comments

Comments
 (0)