forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#126095 - Oneirical:final-testination, r=jieyouxu Migrate `link-args-order`, `ls-metadata` and `lto-readonly-lib` `run-make` tests to `rmake` Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Guaranteed to fail CI until rust-lang#125736 gets merged. Will require addition of `fs_wrapper::set_permissions` in the associated module. try-job: x86_64-msvc
- Loading branch information
Showing
8 changed files
with
78 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Passing linker arguments to the compiler used to be lost or reordered in a messy way | ||
// as they were passed further to the linker. This was fixed in #70665, and this test | ||
// checks that linker arguments remain intact and in the order they were originally passed in. | ||
// See https://github.com/rust-lang/rust/pull/70665 | ||
|
||
//@ ignore-msvc | ||
// Reason: the ld linker does not exist on Windows. | ||
|
||
use run_make_support::rustc; | ||
|
||
fn main() { | ||
rustc() | ||
.input("empty.rs") | ||
.linker_flavor("ld") | ||
.link_arg("a") | ||
.link_args("b c") | ||
.link_args("d e") | ||
.link_arg("f") | ||
.run_fail() | ||
.assert_stderr_contains(r#""a" "b" "c" "d" "e" "f""#); | ||
rustc() | ||
.input("empty.rs") | ||
.linker_flavor("ld") | ||
.arg("-Zpre-link-arg=a") | ||
.arg("-Zpre-link-args=b c") | ||
.arg("-Zpre-link-args=d e") | ||
.arg("-Zpre-link-arg=f") | ||
.run_fail() | ||
.assert_stderr_contains(r#""a" "b" "c" "d" "e" "f""#); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Passing invalid files to -Z ls (which lists the symbols | ||
// defined by a library crate) used to cause a segmentation fault. | ||
// As this was fixed in #11262, this test checks that no segfault | ||
// occurs when passing the invalid file `bar` to -Z ls. | ||
// See https://github.com/rust-lang/rust/issues/11259 | ||
|
||
//@ ignore-cross-compile | ||
|
||
use run_make_support::fs_wrapper; | ||
use run_make_support::rustc; | ||
|
||
fn main() { | ||
rustc().input("foo.rs").run(); | ||
rustc().arg("-Zls=root").input("foo").run(); | ||
fs_wrapper::create_file("bar"); | ||
rustc().arg("-Zls=root").input("bar").run(); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// When the compiler is performing link time optimization, it will | ||
// need to copy the original rlib file, set the copy's permissions to read/write, | ||
// and modify that copy - even if the original | ||
// file is read-only. This test creates a read-only rlib, and checks that | ||
// compilation with LTO succeeds. | ||
// See https://github.com/rust-lang/rust/pull/17619 | ||
|
||
//@ ignore-cross-compile | ||
|
||
use run_make_support::fs_wrapper; | ||
use run_make_support::{run, rust_lib_name, rustc, test_while_readonly}; | ||
|
||
fn main() { | ||
rustc().input("lib.rs").run(); | ||
test_while_readonly(rust_lib_name("lib"), || { | ||
rustc().input("main.rs").arg("-Clto").run(); | ||
run("main"); | ||
}); | ||
} |