Skip to content

Commit cb28fc8

Browse files
committed
rewrite extern-fn-with-union to rmake
1 parent 034cbfa commit cb28fc8

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ run-make/extern-fn-reachable/Makefile
2828
run-make/extern-fn-struct-passing-abi/Makefile
2929
run-make/extern-fn-with-extern-types/Makefile
3030
run-make/extern-fn-with-packed-struct/Makefile
31-
run-make/extern-fn-with-union/Makefile
3231
run-make/extern-multiple-copies/Makefile
3332
run-make/extern-multiple-copies2/Makefile
3433
run-make/fmt-write-bloat/Makefile

tests/run-make/extern-fn-generic/rmake.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// test simply runs a Rust program containing generics that is also reliant on
33
// a C library, and checks that compilation and execution are successful.
44
// See https://github.com/rust-lang/rust/pull/15831
5+
56
//@ ignore-cross-compile
67
// Reason: the compiled binary is executed
78

tests/run-make/extern-fn-with-union/Makefile

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// If an external function from foreign-function interface was called upon,
2+
// its attributes would only be passed to LLVM if and only if it was called in the same crate.
3+
// This caused passing around unions to be incorrect.
4+
// See https://github.com/rust-lang/rust/pull/14191
5+
6+
//@ ignore-cross-compile
7+
// Reason: the compiled binary is executed
8+
9+
use run_make_support::{build_native_static_lib, run, rustc};
10+
11+
fn main() {
12+
build_native_static_lib("ctest");
13+
rustc().input("testcrate.rs").run();
14+
rustc().input("test.rs").run();
15+
run("test");
16+
}

0 commit comments

Comments
 (0)