Change:
Some run-make tests require an directive as a workaround for link failures that occur during CI. and or modified tests to include this directive in order to avoid at least this error: . I assume that this shouldn't be necessary, and that there is actually some deficiency in our CI build system that we can fix.
Never mind, it may not be related. Sorry for the noise.

Discussion:
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { let builder = run.builder; <del> run.path("src/tools/linkchecker").default_condition(builder.config.docs) </del> <ins> let run = run.path("src/tools/linkchecker"); let hosts = &builder.hosts; let targets = &builder.targets; // if we have different hosts and targets, some things may be built for // the host (e.g. rustc) and others for the target (e.g. std). The // documentation built for each will contain broken links to // docs built for the other platform (e.g. rustc linking to cargo) if (hosts != targets) && !hosts.is_empty() && !targets.is_empty() { panic!( "Linkcheck currently does not support builds with different hosts and targets. You can skip linkcheck with --exclude src/tools/linkchecker" ); } run.default_condition(builder.config.docs) </ins> } fn make_run(run: RunConfig<'_>) {

RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS --qemu-riscv64-rootfs=/tmp/rootfs <del> ENV SCRIPT python3 ../x.py --stage 2 test --target riscv64gc-unknown-linux-gnu </del> <ins> ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target riscv64gc-unknown-linux-gnu </ins> ENV NO_CHANGE_USER=1

# This is intended to make sure that both `--pass=check` continues to # work. # <del> python2.7 ../x.py --stage 2 test src/test/ui --pass=check --target=i686-unknown-linux-gnu &&  </del> <ins> python2.7 ../x.py --stage 2 test src/test/ui --pass=check  --host='' --target=i686-unknown-linux-gnu &&  </ins> # Run tidy at the very end, after all the other tests. python2.7 ../x.py --stage 2 test src/tools/tidy

<del> include ../../run-make-fulldeps/tools.mk </del> <ins> # ignore-none no-std is not supported # ignore-nvptx64-nvidia-cuda FIXME: can't find crate for `std` </ins> <del> # FIXME https://github.com/rust-lang/rust/issues/78911 # ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64) </del> <ins> include ../../run-make-fulldeps/tools.mk </ins> # Tests that we don't ICE during incremental compilation after modifying a # function span such that its previous end line exceeds the number of lines

mkdir $(SRC) mkdir $(INCR) cp a.rs $(SRC)/main.rs <del> $(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs </del> <ins> $(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET) </ins> cp b.rs $(SRC)/main.rs <del> $(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs </del> <ins> $(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET) </ins>

<del> include ../../run-make-fulldeps/tools.mk </del> <ins> # ignore-riscv64 $(call RUN,foo) expects to run the target executable natively #                              so it won't work with remote-test-server # ignore-arm Another build using remote-test-server # ignore-none no-std is not supported # ignore-wasm32 FIXME: don't attempt to compile C++ to WASM # ignore-wasm64 FIXME: don't attempt to compile C++ to WASM # ignore-nvptx64-nvidia-cuda FIXME: can't find crate for `std` # ignore-musl FIXME: this makefile needs teaching how to use a musl toolchain #                    (see dist-i586-gnu-i586-i686-musl Dockerfile) </ins> <del> # FIXME https://github.com/rust-lang/rust/issues/78911 # ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64) </del> <ins> include ../../run-make-fulldeps/tools.mk </ins> all: foo $(call RUN,foo) foo: foo.rs $(call NATIVE_STATICLIB,foo) <del> $(RUSTC) $< -lfoo $(EXTRARSCXXFLAGS) </del> <ins> $(RUSTC) $< -lfoo $(EXTRARSCXXFLAGS) --target $(TARGET) </ins> $(TMPDIR)/libfoo.o: foo.cpp $(call COMPILE_OBJ_CXX,$@,$<)

include ../../run-make-fulldeps/tools.mk <del> # FIXME https://github.com/rust-lang/rust/issues/78911 # ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64) </del> <ins> # ignore-none no-std is not supported # ignore-nvptx64-nvidia-cuda FIXME: can't find crate for 'std' </ins> # Regression test for issue #83112 # The generated test harness code contains spans with a dummy location,

mkdir $(SRC)/mydir mkdir $(INCR) cp main.rs $(SRC)/main.rs <del> $(RUSTC) --test -C incremental=$(INCR) $(SRC)/main.rs </del> <ins> $(RUSTC) --test -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET) </ins> mv $(SRC)/main.rs $(SRC)/mydir/main.rs <del> $(RUSTC) --test -C incremental=$(INCR) $(SRC)/mydir/main.rs </del> <ins> $(RUSTC) --test -C incremental=$(INCR) $(SRC)/mydir/main.rs --target $(TARGET) </ins>