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

Rollup of 7 pull requests #127906

Merged
merged 27 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
72e2255
cleanup: remove support for 3DNow! cpu features
durin42 Jul 17, 2024
a47ca19
rewrite extern-fn-with-extern-types to rmake
Oneirical Jul 8, 2024
a795d89
rewrite and rename issue-25581
Oneirical Jul 8, 2024
d6a3f65
rewrite extern-fn-struct-passing-abi to rmake
Oneirical Jul 8, 2024
98454ec
rewrite longjmp-across-rust to rmake
Oneirical Jul 8, 2024
205bfe7
rewrite static-extern-type to rmake
Oneirical Jul 8, 2024
bde9178
rewrite extern-fn-explicit-align to rmake
Oneirical Jul 8, 2024
f7d67d6
rewrite extern-fn-with-packed-struct to rmake
Oneirical Jul 8, 2024
c68d25b
rewrite extern-fn-mangle to rmake
Oneirical Jul 8, 2024
d83ada3
rewrite and rename issue-85401-static-mir
Oneirical Jul 16, 2024
890ef11
rewrite missing-crate-dependency to rmake
Oneirical Jul 16, 2024
3ba62f0
rewrite unstable-flag-required to rmake
Oneirical Jul 16, 2024
7f3f34d
Mark myself as on leave
oli-obk Jul 18, 2024
487802d
Remove `TrailingToken`.
nnethercote Jul 16, 2024
69157bd
Add missing GHA group for building `llvm-bitcode-linker`
Kobzol Jul 18, 2024
fa74a9e
valtree construction: keep track of which type was valtree-incompatible
RalfJung Jul 13, 2024
e613bc9
const_to_pat: cleanup leftovers from when we had to deal with non-str…
RalfJung Jul 13, 2024
86ce911
pattern lowering: make sure we never call user-defined PartialEq inst…
RalfJung Jul 13, 2024
67c99d6
avoid creating an Instance only to immediately disassemble it again
RalfJung Jul 13, 2024
303a2db
remove saw_const_match_error; check if pattern contains an Error instead
RalfJung Jul 15, 2024
78fe5f7
Rollup merge of #127491 - Oneirical:bulletproof-test, r=jieyouxu
tgross35 Jul 18, 2024
a2178df
Rollup merge of #127687 - RalfJung:pattern-cleanup, r=oli-obk,lcnr
tgross35 Jul 18, 2024
d817c0f
Rollup merge of #127822 - Oneirical:amazon-rainfortest, r=jieyouxu
tgross35 Jul 18, 2024
e2e0681
Rollup merge of #127842 - nnethercote:rm-TrailingToken, r=petrochenkov
tgross35 Jul 18, 2024
e4bc3d5
Rollup merge of #127864 - durin42:farewell-3dnow, r=nikic
tgross35 Jul 18, 2024
73eba8e
Rollup merge of #127899 - oli-obk:leave, r=lqd
tgross35 Jul 18, 2024
16d2b61
Rollup merge of #127901 - Kobzol:llvm-bitcode-linker-gha-group, r=onu…
tgross35 Jul 18, 2024
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
8 changes: 0 additions & 8 deletions src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@ run-make/emit-to-stdout/Makefile
run-make/export-executable-symbols/Makefile
run-make/extern-diff-internal-name/Makefile
run-make/extern-flag-disambiguates/Makefile
run-make/extern-fn-explicit-align/Makefile
run-make/extern-fn-generic/Makefile
run-make/extern-fn-mangle/Makefile
run-make/extern-fn-reachable/Makefile
run-make/extern-fn-struct-passing-abi/Makefile
run-make/extern-fn-with-extern-types/Makefile
run-make/extern-fn-with-packed-struct/Makefile
run-make/extern-fn-with-union/Makefile
run-make/extern-multiple-copies/Makefile
run-make/extern-multiple-copies2/Makefile
Expand All @@ -44,7 +39,6 @@ run-make/issue-107094/Makefile
run-make/issue-14698/Makefile
run-make/issue-15460/Makefile
run-make/issue-22131/Makefile
run-make/issue-25581/Makefile
run-make/issue-26006/Makefile
run-make/issue-28595/Makefile
run-make/issue-33329/Makefile
Expand All @@ -67,7 +61,6 @@ run-make/link-path-order/Makefile
run-make/linkage-attr-on-static/Makefile
run-make/long-linker-command-lines-cmd-exe/Makefile
run-make/long-linker-command-lines/Makefile
run-make/longjmp-across-rust/Makefile
run-make/lto-linkage-used-attr/Makefile
run-make/lto-no-link-whole-rlib/Makefile
run-make/lto-smoke-c/Makefile
Expand Down Expand Up @@ -111,7 +104,6 @@ run-make/simd-ffi/Makefile
run-make/split-debuginfo/Makefile
run-make/stable-symbol-names/Makefile
run-make/static-dylib-by-default/Makefile
run-make/static-extern-type/Makefile
run-make/staticlib-blank-lib/Makefile
run-make/staticlib-dylib-linkage/Makefile
run-make/symbol-mangling-hashed/Makefile
Expand Down
6 changes: 0 additions & 6 deletions tests/run-make/extern-fn-explicit-align/Makefile

This file was deleted.

17 changes: 17 additions & 0 deletions tests/run-make/extern-fn-explicit-align/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// The compiler's rules of alignment for indirectly passed values in a 16-byte aligned argument,
// in a C external function, used to be arbitrary. Unexpected behavior would occasionally occur
// and cause memory corruption. This was fixed in #112157, streamlining the way alignment occurs,
// and this test reproduces the case featured in the issue, checking that it compiles and executes
// successfully.
// See https://github.com/rust-lang/rust/issues/80127

//@ 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");
}
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");
}
17 changes: 17 additions & 0 deletions tests/run-make/extern-fn-slice-no-ice/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Slices were broken when implicated in foreign-function interface (FFI) with
// a C library, with something as simple as measuring the length or returning
// an item at a certain index of a slice would cause an internal compiler error (ICE).
// This was fixed in #25653, and this test checks that slices in Rust-C FFI can be part
// of a program that compiles and executes successfully.
// See https://github.com/rust-lang/rust/issues/25581

//@ 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");
}
6 changes: 0 additions & 6 deletions tests/run-make/extern-fn-struct-passing-abi/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/extern-fn-struct-passing-abi/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Functions with more than 6 arguments using foreign function interfaces (FFI) with C libraries
// would have their arguments unexpectedly swapped, causing unexpected behaviour in Rust-C FFI
// programs. This test compiles and executes Rust code with bulky functions of up to 7 arguments
// and uses assertions to check for unexpected swaps.
// See https://github.com/rust-lang/rust/issues/25594

//@ 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");
}
6 changes: 0 additions & 6 deletions tests/run-make/extern-fn-with-extern-types/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/extern-fn-with-extern-types/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This test checks the functionality of foreign function interface (FFI) where Rust
// must call upon a C library defining functions, where these functions also use custom
// types defined by the C file. In addition to compilation being successful, the binary
// should also successfully execute.
// See https://github.com/rust-lang/rust/pull/44295

//@ 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("test.rs").run();
run("test");
}
6 changes: 0 additions & 6 deletions tests/run-make/extern-fn-with-packed-struct/Makefile

This file was deleted.

17 changes: 17 additions & 0 deletions tests/run-make/extern-fn-with-packed-struct/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Packed structs, in C, occupy less bytes in memory, but are more
// vulnerable to alignment errors. Passing them around in a Rust-C foreign
// function interface (FFI) would cause unexpected behavior, until this was
// fixed in #16584. This test checks that a Rust program with a C library
// compiles and executes successfully, even with usage of a packed struct.
// See https://github.com/rust-lang/rust/issues/16574

//@ 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");
}
6 changes: 0 additions & 6 deletions tests/run-make/issue-25581/Makefile

This file was deleted.

6 changes: 0 additions & 6 deletions tests/run-make/longjmp-across-rust/Makefile

This file was deleted.

18 changes: 18 additions & 0 deletions tests/run-make/longjmp-across-rust/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// longjmp, an error handling function used in C, is useful
// for jumping out of nested call chains... but it used to accidentally
// trigger Rust's cleanup system in a way that caused an unexpected abortion
// of the program. After this was fixed in #48572, this test compiles and executes
// a program that jumps between Rust and its C library, with longjmp included. For
// the test to succeed, no unexpected abortion should occur.
// See https://github.com/rust-lang/rust/pull/48572

//@ 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("foo");
rustc().input("main.rs").run();
run("main");
}
6 changes: 0 additions & 6 deletions tests/run-make/static-extern-type/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/static-extern-type/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Static variables coming from a C library through foreign function interface (FFI) are unsized
// at compile time - and assuming they are sized used to cause an internal compiler error (ICE).
// After this was fixed in #58192, this test checks that external statics can be safely used in
// a program that both compiles and executes successfully.
// See https://github.com/rust-lang/rust/issues/57876

//@ 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("define-foo");
rustc().arg("-ldefine-foo").input("use-foo.rs").run();
run("use-foo");
}