Skip to content

Commit a143d6d

Browse files
committed
run-make: Specify --target to rustc
Resolves #78911 The target's linker was used but rustc wasn't told to build for that target (instead defaulting to the host). This led to the host instead of the target getting tested and to the linker getting inappropriate arguments.
1 parent 1316702 commit a143d6d

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
include ../../run-make-fulldeps/tools.mk
22

3-
# FIXME https://github.com/rust-lang/rust/issues/78911
4-
# ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64)
5-
63
# Tests that we don't ICE during incremental compilation after modifying a
74
# function span such that its previous end line exceeds the number of lines
85
# in the new file, but its start line/column and length remain the same.
@@ -14,6 +11,6 @@ all:
1411
mkdir $(SRC)
1512
mkdir $(INCR)
1613
cp a.rs $(SRC)/main.rs
17-
$(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs
14+
$(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET)
1815
cp b.rs $(SRC)/main.rs
19-
$(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs
16+
$(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET)
+1-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
include ../../run-make-fulldeps/tools.mk
22

3-
# FIXME https://github.com/rust-lang/rust/issues/78911
4-
# ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64)
5-
63
all: foo
74
$(call RUN,foo)
85

96
foo: foo.rs $(call NATIVE_STATICLIB,foo)
10-
$(RUSTC) $< -lfoo $(EXTRARSCXXFLAGS)
7+
$(RUSTC) $< -lfoo $(EXTRARSCXXFLAGS) --target $(TARGET)
118

129
$(TMPDIR)/libfoo.o: foo.cpp
1310
$(call COMPILE_OBJ_CXX,$@,$<)

src/test/run-make/issue-83112-incr-test-moved-file/Makefile

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
include ../../run-make-fulldeps/tools.mk
22

3-
# FIXME https://github.com/rust-lang/rust/issues/78911
4-
# ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64)
5-
63
# Regression test for issue #83112
74
# The generated test harness code contains spans with a dummy location,
85
# but a non-dummy SyntaxContext. Previously, the incremental cache was encoding
@@ -20,6 +17,6 @@ all:
2017
mkdir $(SRC)/mydir
2118
mkdir $(INCR)
2219
cp main.rs $(SRC)/main.rs
23-
$(RUSTC) --test -C incremental=$(INCR) $(SRC)/main.rs
20+
$(RUSTC) --test -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET)
2421
mv $(SRC)/main.rs $(SRC)/mydir/main.rs
25-
$(RUSTC) --test -C incremental=$(INCR) $(SRC)/mydir/main.rs
22+
$(RUSTC) --test -C incremental=$(INCR) $(SRC)/mydir/main.rs --target $(TARGET)

0 commit comments

Comments
 (0)