Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate 9 more very similar FFI run-make tests to rmake #127663

Merged
merged 9 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rewrite extern-fn-with-union to rmake
  • Loading branch information
Oneirical committed Jul 19, 2024
commit 01c7118fa99a0c1f2df47b25c63fae6f62ef6ed1
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 @@ -21,7 +21,6 @@ run-make/export-executable-symbols/Makefile
run-make/extern-diff-internal-name/Makefile
run-make/extern-flag-disambiguates/Makefile
run-make/extern-fn-reachable/Makefile
run-make/extern-fn-with-union/Makefile
run-make/extern-multiple-copies/Makefile
run-make/extern-multiple-copies2/Makefile
run-make/fmt-write-bloat/Makefile
Expand Down
1 change: 1 addition & 0 deletions tests/run-make/extern-fn-generic/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// test simply runs a Rust program containing generics that is also reliant on
// a C library, and checks that compilation and execution are successful.
// See https://github.com/rust-lang/rust/pull/15831

//@ ignore-cross-compile
// Reason: the compiled binary is executed

Expand Down
7 changes: 0 additions & 7 deletions tests/run-make/extern-fn-with-union/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/extern-fn-with-union/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// If an external function from foreign-function interface was called upon,
// its attributes would only be passed to LLVM if and only if it was called in the same crate.
// This caused passing around unions to be incorrect.
// See https://github.com/rust-lang/rust/pull/14191

//@ 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("ctest");
rustc().input("testcrate.rs").run();
rustc().input("test.rs").run();
run("test");
}