Skip to content

Commit e175b83

Browse files
committed
rewrite incr-foreign-head-span to rmake
1 parent c424bc6 commit e175b83

File tree

7 files changed

+33
-25
lines changed

7 files changed

+33
-25
lines changed

src/tools/compiletest/src/command-list.rs

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
201201
"only-wasm32-wasip1",
202202
"only-watchos",
203203
"only-windows",
204+
"only-windows-gnu",
204205
"only-x86",
205206
"only-x86_64",
206207
"only-x86_64-fortanix-unknown-sgx",

src/tools/run-make-support/src/external_deps/cc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub fn cc() -> Cc {
1616
}
1717

1818
/// Construct a new platform-specific CXX compiler invocation.
19+
/// CXX_DEFAULT_FLAGS is passed from compiletest.
1920
#[track_caller]
2021
pub fn cxx() -> Cc {
2122
Cc::new_cxx()
@@ -51,6 +52,7 @@ impl Cc {
5152
}
5253

5354
/// Construct a new platform-specific CXX compiler invocation.
55+
/// CXX_DEFAULT_FLAGS is passed from compiletest.
5456
#[track_caller]
5557
pub fn new_cxx() -> Self {
5658
let compiler = env_var("CXX");

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ run-make/foreign-double-unwind/Makefile
1919
run-make/foreign-exceptions/Makefile
2020
run-make/foreign-rust-exceptions/Makefile
2121
run-make/incr-add-rust-src-component/Makefile
22-
run-make/incr-foreign-head-span/Makefile
2322
run-make/issue-35164/Makefile
2423
run-make/issue-36710/Makefile
2524
run-make/issue-47551/Makefile

tests/run-make/compiler-rt-works-on-mingw/rmake.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// `compiler-rt` ("runtime") is a suite of LLVM features compatible with rustc.
2-
// After building it was enabled on Windows-gnu in #29874, this test checks
3-
// that compilation and execution with it are successful.
2+
// After building it was enabled on Windows-gnu in #29874, this test is a basic smoke test to
3+
// check if building and linking to it can work at all.
44
// See https://github.com./rust-lang/rust/pull/29478
55

66
//@ only-windows-gnu

tests/run-make/incr-foreign-head-span/Makefile

-21
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Ensure that modifying a crate on disk (without recompiling it)
2+
// does not cause ICEs (internal compiler errors) in downstream crates.
3+
// Previously, we would call `SourceMap.guess_head_span` on a span
4+
// from an external crate, which would cause us to read an upstream
5+
// source file from disk during compilation of a downstream crate.
6+
// See https://github.com./rust-lang/rust/issues/86480
7+
8+
//@ ignore-none
9+
// Reason: no-std is not supported
10+
//@ ignore-nvptx64-nvidia-cuda
11+
// Reason: can't find crate for 'std'
12+
13+
use run_make_support::{rfs, rust_lib_name, rustc};
14+
15+
fn main() {
16+
rustc().input("first_crate.rs").incremental("incr").crate_type("lib").run();
17+
rustc()
18+
.input("second_crate.rs")
19+
.incremental("incr")
20+
.extern_("first_crate", rust_lib_name("first_crate"))
21+
.crate_type("lib")
22+
.run();
23+
rfs::remove_file("first_crate.rs");
24+
rustc().input("second_crate.rs").incremental("incr").cfg("second_run").crate_type("lib").run();
25+
}

tests/run-make/interdependent-c-libraries/rmake.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
// library will be stripped out, and the linkage will fail.
77
// See https://github.com./rust-lang/rust/commit/e6072fa0c4c22d62acf3dcb78c8ee260a1368bd7
88

9-
// FIXME(Oneirical): test-various
9+
//@ ignore-cross-compile
10+
// Reason: linkage still fails as the object files produced are not in the correct
11+
// format in the `build_native_static_lib` step
1012

1113
use run_make_support::{build_native_static_lib, rustc};
1214

0 commit comments

Comments
 (0)