Skip to content

Commit 2f7672f

Browse files
committed
run-make: Specify --target to rustc
Resolves rust-lang#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 e7c23ab commit 2f7672f

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed
Lines changed: 2 additions & 5 deletions
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)
Lines changed: 1 addition & 4 deletions
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,$@,$<)

0 commit comments

Comments
 (0)