Skip to content

Commit

Permalink
rewrite extern-fn-mangle to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jul 8, 2024
1 parent e66819a commit 85fd830
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ run-make/extern-diff-internal-name/Makefile
run-make/extern-flag-disambiguates/Makefile
run-make/extern-flag-pathless/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
Expand Down
6 changes: 0 additions & 6 deletions tests/run-make/extern-fn-mangle/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/extern-fn-mangle/rmake.rs
Original file line number Diff line number Diff line change
@@ -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");
}

0 comments on commit 85fd830

Please sign in to comment.