Skip to content

Commit 266d545

Browse files
committed
rewrite extern-fn-with-union to rmake
1 parent 1cc97d0 commit 266d545

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

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ run-make/extern-fn-reachable/Makefile
3131
run-make/extern-fn-struct-passing-abi/Makefile
3232
run-make/extern-fn-with-extern-types/Makefile
3333
run-make/extern-fn-with-packed-struct/Makefile
34-
run-make/extern-fn-with-union/Makefile
3534
run-make/extern-multiple-copies/Makefile
3635
run-make/extern-multiple-copies2/Makefile
3736
run-make/extra-filename-with-temp-outputs/Makefile

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

+1
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

-7
This file was deleted.
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)