Skip to content

Commit 8ea2123

Browse files
committed
auto merge of #10220 : luqmana/rust/con, r=brson
Previously we were actually overwriting `CFG_{HOST,TARGET,BUILD}` with `CFG_{HOST,TARGET,BUILD}_TRIPLE(S)` since configure tested for the legacy one by checking if it was empty which would never be the case. That meant it wouldn't split up multiple triples and just treat it as one long triple. This pull also fixes the rules that were changed when librustuv was added to use the right CFG_ vars and removes the legacy flags.
2 parents fa2bb97 + d9decf3 commit 8ea2123

File tree

3 files changed

+10
-36
lines changed

3 files changed

+10
-36
lines changed

configure

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,6 @@ valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
400400
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
401401
valopt libdir "${CFG_PREFIX}/lib" "install libraries"
402402

403-
#Deprecated opts to keep compatibility
404-
valopt build-triple "${CFG_BUILD}" "LLVM build triple"
405-
valopt host-triples "${CFG_HOST}" "LLVM host triples"
406-
valopt target-triples "${CFG_TARGET}" "LLVM target triples"
407-
408403
# Validate Options
409404
step_msg "validating $CFG_SELF args"
410405
validate_opt
@@ -601,7 +596,6 @@ then
601596
fi
602597

603598
# a little post-processing of various config values
604-
605599
CFG_PREFIX=${CFG_PREFIX%/}
606600
CFG_MANDIR=${CFG_MANDIR%/}
607601
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
@@ -616,26 +610,6 @@ do
616610
done
617611
CFG_TARGET=$V_TEMP
618612

619-
# copy host-triples to target-triples so that hosts are a subset of targets
620-
# XXX: remove deprecated variables here
621-
V_TEMP=""
622-
for i in $CFG_HOST_TRIPLES $CFG_TARGET_TRIPLES;
623-
do
624-
echo "$V_TEMP" | grep -qF $i || V_TEMP="$V_TEMP${V_TEMP:+ }$i"
625-
done
626-
CFG_TARGET_TRIPLES=$V_TEMP
627-
628-
# XXX: Support for deprecated syntax, should be dropped.
629-
if [ ! -z "$CFG_BUILD_TRIPLE" ]; then
630-
CFG_BUILD=${CFG_BUILD_TRIPLE}
631-
fi
632-
if [ ! -z "$CFG_HOST_TRIPLES" ]; then
633-
CFG_HOST=${CFG_HOST_TRIPLES}
634-
fi
635-
if [ ! -z "$CFG_TARGET_TRIPLES" ]; then
636-
CFG_TARGET=${CFG_TARGET_TRIPLES}
637-
fi
638-
639613
# check target-specific tool-chains
640614
for i in $CFG_TARGET
641615
do

mk/stage0.mk

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ $(HLIB0_H_$(CFG_BUILD))/$(CFG_EXTRALIB_$(CFG_BUILD)): \
4242
| $(HLIB0_H_$(CFG_BUILD))/
4343
$(Q)touch $@
4444

45-
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_LIBRUSTUV_$(CFG_BUILD)): \
46-
$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD)) \
47-
| $(HLIB0_H_$(CFG_BUILD_TRIPLE))/
45+
$(HLIB0_H_$(CFG_BUILD))/$(CFG_LIBRUSTUV_$(CFG_BUILD)): \
46+
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
47+
| $(HLIB0_H_$(CFG_BUILD))/
4848
$(Q)touch $@
4949

50-
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_LIBRUSTC_$(CFG_BUILD)): \
51-
$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD)) \
52-
| $(HLIB0_H_$(CFG_BUILD_TRIPLE))/
50+
$(HLIB0_H_$(CFG_BUILD))/$(CFG_LIBRUSTC_$(CFG_BUILD)): \
51+
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
52+
| $(HLIB0_H_$(CFG_BUILD))/
5353
$(Q)touch $@
5454

5555
$(HLIB0_H_$(CFG_BUILD))/$(CFG_RUSTLLVM_$(CFG_BUILD)): \
@@ -124,5 +124,5 @@ endef
124124

125125
# Use stage1 to build other architectures: then you don't have to wait
126126
# for stage2, but you get the latest updates to the compiler source.
127-
$(foreach t,$(NON_BUILD_HOSTS), \
127+
$(foreach t,$(NON_BUILD_HOST), \
128128
$(eval $(call BOOTSTRAP_STAGE0,$(t),1,$(CFG_BUILD))))

mk/tests.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ $(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \
164164
$(CFG_ADB_TEST_DIR)) \
165165
$(shell adb push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(EXTRALIB_GLOB_arm-linux-androideabi) \
166166
$(CFG_ADB_TEST_DIR)) \
167-
$(shell adb push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD_TRIPLE))/$(LIBRUSTUV_GLOB_arm-linux-androideabi) \
167+
$(shell adb push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(LIBRUSTUV_GLOB_arm-linux-androideabi) \
168168
$(CFG_ADB_TEST_DIR)) \
169169
)
170170
else
@@ -471,8 +471,8 @@ define DEF_RUSTPKG_STACK_FIX
471471
$$(call TEST_OK_FILE,$(1),$(2),$(3),rustpkg): export RUST_MIN_STACK=8000000
472472
endef
473473

474-
$(foreach host,$(CFG_HOST_TRIPLES), \
475-
$(foreach target,$(CFG_TARGET_TRIPLES), \
474+
$(foreach host,$(CFG_HOST), \
475+
$(foreach target,$(CFG_TARGET), \
476476
$(foreach stage,$(STAGES), \
477477
$(eval $(call DEF_RUSTPKG_STACK_FIX,$(stage),$(target),$(host))))))
478478

0 commit comments

Comments
 (0)