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.
Auto merge of rust-lang#127989 - Oneirical:testricted-area, r=<try>
Migrate `interdependent-c-libraries`, `compiler-rt-works-on-mingw` and `incr-foreign-head-span` `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). Please try: try-job: x86_64-mingw
- Loading branch information
Showing
10 changed files
with
84 additions
and
49 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 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,15 @@ | ||
// `compiler-rt` ("runtime") is a suite of LLVM features compatible with rustc. | ||
// After building it was enabled on Windows-gnu in #29874, this test checks | ||
// that compilation and execution with it are successful. | ||
// See https://github.com/rust-lang/rust/pull/29478 | ||
|
||
//@ only-windows-gnu | ||
|
||
use run_make_support::{cxx, is_msvc, llvm_ar, run, rustc, static_lib_name}; | ||
|
||
fn main() { | ||
cxx().input("foo.cpp").arg("-c").out_exe("foo.o").run(); | ||
llvm_ar().obj_to_ar().output_input(static_lib_name("foo"), "foo.o").run(); | ||
rustc().input("foo.rs").arg("-lfoo").arg("-lstdc++").run(); | ||
run("foo"); | ||
} |
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,25 @@ | ||
// Ensure that modifying a crate on disk (without recompiling it) | ||
// does not cause ICEs (internal compiler errors) in downstream crates. | ||
// Previously, we would call `SourceMap.guess_head_span` on a span | ||
// from an external crate, which would cause us to read an upstream | ||
// source file from disk during compilation of a downstream crate. | ||
// See https://github.com/rust-lang/rust/issues/86480 | ||
|
||
//@ ignore-none | ||
// Reason: no-std is not supported | ||
//@ ignore-nvptx64-nvidia-cuda | ||
// Reason: can't find crate for 'std' | ||
|
||
use run_make_support::{rfs, rust_lib_name, rustc}; | ||
|
||
fn main() { | ||
rustc().input("first_crate.rs").incremental("incr").crate_type("lib").run(); | ||
rustc() | ||
.input("second_crate.rs") | ||
.incremental("incr") | ||
.extern_("first_crate", rust_lib_name("first_crate")) | ||
.crate_type("lib") | ||
.run(); | ||
rfs::remove_file("first_crate.rs"); | ||
rustc().input("second_crate.rs").incremental("incr").cfg("second_run").crate_type("lib").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,21 @@ | ||
// The rust crate foo will link to the native library foo, while the rust crate | ||
// bar will link to the native library bar. There is also a dependency between | ||
// the native library bar to the natibe library foo. | ||
// This test ensures that the ordering of -lfoo and -lbar on the command line is | ||
// correct to complete the linkage. If passed as "-lfoo -lbar", then the 'foo' | ||
// library will be stripped out, and the linkage will fail. | ||
// See https://github.com/rust-lang/rust/commit/e6072fa0c4c22d62acf3dcb78c8ee260a1368bd7 | ||
|
||
//@ ignore-cross-compile | ||
// Reason: linkage still fails as the object files produced are not in the correct | ||
// format in the `build_native_static_lib` step | ||
|
||
use run_make_support::{build_native_static_lib, rustc}; | ||
|
||
fn main() { | ||
build_native_static_lib("foo"); | ||
build_native_static_lib("bar"); | ||
rustc().input("foo.rs").run(); | ||
rustc().input("bar.rs").run(); | ||
rustc().input("main.rs").print("link-args").run(); | ||
} |