Skip to content

Commit 05515a8

Browse files
committed
---
yaml --- r: 44683 b: refs/heads/master c: cec1f38 h: refs/heads/master i: 44681: db90a21 44679: f2e6204 v: v3
1 parent 74e5d49 commit 05515a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+789
-762
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 42be216848f1df70528ea7aaa57d9a4c5cfc1847
2+
refs/heads/master: cec1f38c309b743b29a386ce71db1b1035ccd89d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/Makefile.in

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,16 @@ include config.mk
7070
ALL_OBJ_FILES :=
7171

7272
MKFILE_DEPS := config.stamp $(call rwildcard,$(CFG_SRC_DIR)mk/,*)
73-
NON_BUILD_HOST_TRIPLES = $(filter-out $(CFG_BUILD_TRIPLE),$(CFG_HOST_TRIPLES))
74-
NON_BUILD_TARGET_TRIPLES = $(filter-out $(CFG_BUILD_TRIPLE),$(CFG_TARGET_TRIPLES))
73+
NON_HOST_TRIPLES = $(filter-out $(CFG_HOST_TRIPLE),$(CFG_TARGET_TRIPLES))
7574

7675
ifneq ($(MAKE_RESTARTS),)
7776
CFG_INFO := $(info cfg: make restarts: $(MAKE_RESTARTS))
7877
endif
7978

80-
CFG_INFO := $(info cfg: build triple $(CFG_BUILD_TRIPLE))
81-
CFG_INFO := $(info cfg: host triples $(CFG_HOST_TRIPLES))
82-
CFG_INFO := $(info cfg: target triples $(CFG_TARGET_TRIPLES))
79+
CFG_INFO := $(info cfg: shell host triple $(CFG_HOST_TRIPLE))
8380

84-
ifneq ($(wildcard $(NON_BUILD_HOST_TRIPLES)),)
85-
CFG_INFO := $(info cfg: non-build host triples $(NON_BUILD_HOST_TRIPLES))
86-
endif
87-
ifneq ($(wildcard $(NON_BUILD_TARGET_TRIPLES)),)
88-
CFG_INFO := $(info cfg: non-build target triples $(NON_BUILD_TARGET_TRIPLES))
81+
ifneq ($(wildcard $(NON_HOST_TRIPLES)),)
82+
CFG_INFO := $(info cfg: non host triples $(NON_HOST_TRIPLES))
8983
endif
9084

9185
CFG_RUSTC_FLAGS := $(RUSTFLAGS)
@@ -278,8 +272,8 @@ LLC_$(1)=$$(CFG_LLVM_INST_DIR_$(1))/bin/llc$$(X)
278272

279273
endef
280274

281-
$(foreach host,$(CFG_HOST_TRIPLES), \
282-
$(eval $(call DEF_LLVM_VARS,$(host))))
275+
$(foreach target,$(CFG_TARGET_TRIPLES), \
276+
$(eval $(call DEF_LLVM_VARS,$(target))))
283277

284278
######################################################################
285279
# Exports for sub-utilities
@@ -291,7 +285,7 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
291285
export CFG_SRC_DIR
292286
export CFG_BUILD_DIR
293287
export CFG_VERSION
294-
export CFG_BUILD_TRIPLE
288+
export CFG_HOST_TRIPLE
295289
export CFG_LLVM_ROOT
296290
export CFG_ENABLE_MINGW_CROSS
297291
export CFG_PREFIX
@@ -415,7 +409,7 @@ CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
415409
# if you're building a cross config, the host->* parts are
416410
# effectively stage1, since it uses the just-built stage0.
417411
ifeq ($(1),0)
418-
ifneq ($(strip $(CFG_BUILD_TRIPLE)),$(strip $(3)))
412+
ifneq ($(strip $(CFG_HOST_TRIPLE)),$(strip $(3)))
419413
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
420414
endif
421415
endif
@@ -436,7 +430,7 @@ PERF_STAGE$(1)_T_$(2)_H_$(3) := \
436430

437431
endef
438432

439-
$(foreach build,$(CFG_HOST_TRIPLES), \
433+
$(foreach build,$(CFG_TARGET_TRIPLES), \
440434
$(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
441435
$(eval $(foreach stage,$(STAGES), \
442436
$(eval $(call SREQ,$(stage),$(target),$(build))))))))
@@ -457,13 +451,13 @@ rustc-stage$(2)-H-$(1): \
457451

458452
endef
459453

460-
$(foreach host,$(CFG_HOST_TRIPLES), \
454+
$(foreach host,$(CFG_TARGET_TRIPLES), \
461455
$(eval $(foreach stage,1 2 3, \
462456
$(eval $(call DEF_RUSTC_STAGE_TARGET,$(host),$(stage))))))
463457

464-
rustc-stage1: rustc-stage1-H-$(CFG_BUILD_TRIPLE)
465-
rustc-stage2: rustc-stage2-H-$(CFG_BUILD_TRIPLE)
466-
rustc-stage3: rustc-stage3-H-$(CFG_BUILD_TRIPLE)
458+
rustc-stage1: rustc-stage1-H-$(CFG_HOST_TRIPLE)
459+
rustc-stage2: rustc-stage2-H-$(CFG_HOST_TRIPLE)
460+
rustc-stage3: rustc-stage3-H-$(CFG_HOST_TRIPLE)
467461

468462
define DEF_RUSTC_TARGET
469463
# $(1) == architecture
@@ -474,12 +468,12 @@ endef
474468
$(foreach host,$(CFG_TARGET_TRIPLES), \
475469
$(eval $(call DEF_RUSTC_TARGET,$(host))))
476470

477-
rustc-stage1: rustc-stage1-H-$(CFG_BUILD_TRIPLE)
478-
rustc-stage2: rustc-stage2-H-$(CFG_BUILD_TRIPLE)
479-
rustc-stage3: rustc-stage3-H-$(CFG_BUILD_TRIPLE)
480-
rustc: rustc-H-$(CFG_BUILD_TRIPLE)
471+
rustc-stage1: rustc-stage1-H-$(CFG_HOST_TRIPLE)
472+
rustc-stage2: rustc-stage2-H-$(CFG_HOST_TRIPLE)
473+
rustc-stage3: rustc-stage3-H-$(CFG_HOST_TRIPLE)
474+
rustc: rustc-H-$(CFG_HOST_TRIPLE)
481475

482-
rustc-H-all: $(foreach host,$(CFG_HOST_TRIPLES),rustc-H-$(host))
476+
rustc-H-all: $(foreach host,$(CFG_TARGET_TRIPLES),rustc-H-$(host))
483477

484478
######################################################################
485479
# Entrypoint rule
@@ -495,27 +489,19 @@ CFG_INFO := $(info cfg: *** stage2 and later will not be built ***)
495489
CFG_INFO := $(info cfg:)
496490

497491
#XXX This is surely busted
498-
all: $(SREQ1$(CFG_BUILD_TRIPLE)) $(GENERATED) docs
492+
all: $(SREQ1$(CFG_HOST_TRIPLE)) $(GENERATED) docs
499493

500494
else
501495

502496
define ALL_TARGET_N
503-
ifneq ($$(findstring $(1),$$(CFG_HOST_TRIPLES)),)
504-
# This is a host
505497
all-target-$(1)-host-$(2): $$(CSREQ2_T_$(1)_H_$(2))
506-
else
507-
# This is a target only
508-
all-target-$(1)-host-$(2): $$(SREQ2_T_$(1)_H_$(2))
509-
endif
510498
endef
511499

512500
$(foreach target,$(CFG_TARGET_TRIPLES), \
513-
$(foreach host,$(CFG_HOST_TRIPLES), \
514-
$(eval $(call ALL_TARGET_N,$(target),$(host)))))
501+
$(eval $(call ALL_TARGET_N,$(target),$(CFG_HOST_TRIPLE))))
515502

516503
ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
517-
$(foreach host,$(CFG_HOST_TRIPLES), \
518-
all-target-$(target)-host-$(host)))
504+
all-target-$(target)-host-$(CFG_HOST_TRIPLE))
519505

520506
all: $(ALL_TARGET_RULES) $(GENERATED) docs
521507

trunk/configure

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ then
301301
fi
302302

303303

304-
DEFAULT_BUILD_TRIPLE="${CFG_CPUTYPE}-${CFG_OSTYPE}"
304+
DEFAULT_HOST_TRIPLE="${CFG_CPUTYPE}-${CFG_OSTYPE}"
305305

306306
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
307307
CFG_BUILD_DIR="$(pwd)/"
@@ -346,9 +346,8 @@ opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-
346346
valopt prefix "/usr/local" "set installation prefix"
347347
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
348348
valopt llvm-root "" "set LLVM root"
349-
valopt build-triple "${DEFAULT_BUILD_TRIPLE}" "LLVM build triple"
350-
valopt host-triples "${CFG_BUILD_TRIPLE}" "LLVM host triples"
351-
valopt target-triples "${CFG_HOST_TRIPLES}" "LLVM target triples"
349+
valopt host-triple "${DEFAULT_HOST_TRIPLE}" "LLVM host triple"
350+
valopt target-triples "${CFG_HOST_TRIPLE}" "LLVM target triples"
352351

353352
# Validate Options
354353
step_msg "validating $CFG_SELF args"
@@ -533,6 +532,10 @@ fi
533532

534533
CFG_PREFIX=${CFG_PREFIX%/}
535534
CFG_TARGET_TRIPLES="$(echo $CFG_TARGET_TRIPLES | tr ',' ' ')"
535+
case $CFG_TARGET_TRIPLES in
536+
(*$CFG_HOST_TRIPLE*) ;;
537+
(*) err "Host triple is not among the target triples." ;;
538+
esac
536539

537540
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
538541
then
@@ -559,13 +562,13 @@ do
559562
done
560563

561564
make_dir llvm
562-
for t in $CFG_HOST_TRIPLES
565+
for t in $CFG_TARGET_TRIPLES
563566
do
564567
make_dir llvm/$t
565568
done
566569

567570
make_dir rustllvm
568-
for t in $CFG_HOST_TRIPLES
571+
for t in $CFG_TARGET_TRIPLES
569572
do
570573
make_dir rustllvm/$t
571574
done
@@ -590,7 +593,7 @@ then
590593
CFG_LIBDIR=bin
591594
fi
592595

593-
for h in $CFG_HOST_TRIPLES
596+
for h in $CFG_TARGET_TRIPLES
594597
do
595598
for t in $CFG_TARGET_TRIPLES
596599
do
@@ -666,7 +669,7 @@ fi
666669
# Configure llvm, only if necessary
667670
step_msg "looking at LLVM"
668671
CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/
669-
for t in $CFG_HOST_TRIPLES
672+
for t in $CFG_TARGET_TRIPLES
670673
do
671674
do_reconfigure=1
672675

@@ -816,8 +819,6 @@ putvar CFG_OSTYPE
816819
putvar CFG_CPUTYPE
817820
putvar CFG_CONFIGURE_ARGS
818821
putvar CFG_PREFIX
819-
putvar CFG_BUILD_TRIPLE
820-
putvar CFG_HOST_TRIPLES
821822
putvar CFG_TARGET_TRIPLES
822823
putvar CFG_C_COMPILER
823824
putvar CFG_LIBDIR
@@ -853,7 +854,7 @@ fi
853854
putvar CFG_LLVM_ROOT
854855
putvar CFG_LLVM_SRC_DIR
855856

856-
for t in $CFG_HOST_TRIPLES
857+
for t in $CFG_TARGET_TRIPLES
857858
do
858859
CFG_LLVM_BUILD_DIR=$(echo CFG_LLVM_BUILD_DIR_${t} | tr - _)
859860
CFG_LLVM_INST_DIR=$(echo CFG_LLVM_INST_DIR_${t} | tr - _)

trunk/mk/clean.mk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
CLEAN_STAGE_RULES = \
1616
$(foreach stage, $(STAGES), \
17-
$(foreach host, $(CFG_HOST_TRIPLES), \
17+
$(foreach host, $(CFG_TARGET_TRIPLES), \
1818
clean$(stage)_H_$(host) \
1919
$(foreach target, $(CFG_TARGET_TRIPLES), \
2020
clean$(stage)_T_$(target)_H_$(host))))
@@ -33,15 +33,15 @@ clean: clean-misc $(CLEAN_STAGE_RULES)
3333

3434
clean-misc:
3535
@$(call E, cleaning)
36-
$(Q)find rustllvm rt $(CFG_BUILD_TRIPLE)/test \
36+
$(Q)find rustllvm rt $(CFG_HOST_TRIPLE)/test \
3737
-name '*.[odasS]' -o \
3838
-name '*.so' -o \
3939
-name '*.dylib' -o \
4040
-name '*.dll' -o \
4141
-name '*.def' -o \
4242
-name '*.bc' \
4343
| xargs rm -f
44-
$(Q)find rustllvm rt $(CFG_BUILD_TRIPLE)\
44+
$(Q)find rustllvm rt $(CFG_HOST_TRIPLE)\
4545
-name '*.dSYM' \
4646
| xargs rm -Rf
4747
$(Q)rm -f $(RUNTIME_OBJS) $(RUNTIME_DEF)
@@ -93,7 +93,7 @@ clean$(1)_H_$(2):
9393

9494
endef
9595

96-
$(foreach host, $(CFG_HOST_TRIPLES), \
96+
$(foreach host, $(CFG_TARGET_TRIPLES), \
9797
$(eval $(foreach stage, $(STAGES), \
9898
$(eval $(call CLEAN_HOST_STAGE_N,$(stage),$(host))))))
9999

@@ -127,12 +127,12 @@ clean$(1)_T_$(2)_H_$(3):
127127
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/run_pass_stage* # For windows
128128
endef
129129

130-
$(foreach host, $(CFG_HOST_TRIPLES), \
130+
$(foreach host, $(CFG_TARGET_TRIPLES), \
131131
$(eval $(foreach target, $(CFG_TARGET_TRIPLES), \
132132
$(eval $(foreach stage, 0 1 2 3, \
133133
$(eval $(call CLEAN_TARGET_STAGE_N,$(stage),$(target),$(host))))))))
134134

135-
define DEF_CLEAN_LLVM_HOST
135+
define DEF_CLEAN_LLVM_TARGET
136136
ifeq ($(CFG_LLVM_ROOT),)
137137
clean-llvm$(1):
138138
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) clean
@@ -142,5 +142,5 @@ clean-llvm$(1): ;
142142
endif
143143
endef
144144

145-
$(foreach host, $(CFG_HOST_TRIPLES), \
146-
$(eval $(call DEF_CLEAN_LLVM_HOST,$(host))))
145+
$(foreach target, $(CFG_TARGET_TRIPLES), \
146+
$(eval $(call DEF_CLEAN_LLVM_TARGET,$(target))))

trunk/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ ifeq ($(CFG_PANDOC),)
171171
else
172172

173173
# The rustdoc executable
174-
RUSTDOC = $(HBIN2_H_$(CFG_BUILD_TRIPLE))/rustdoc$(X)
174+
RUSTDOC = $(HBIN2_H_$(CFG_HOST_TRIPLE))/rustdoc$(X)
175175

176176
# The library documenting macro
177177
# $(1) - The output directory

trunk/mk/host.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM): \
115115

116116
endef
117117

118-
$(foreach t,$(CFG_HOST_TRIPLES), \
118+
$(foreach t,$(CFG_TARGET_TRIPLES), \
119119
$(eval $(call CP_HOST_STAGE_N,0,1,$(t),$(t))) \
120120
$(eval $(call CP_HOST_STAGE_N,1,2,$(t),$(t))) \
121121
$(eval $(call CP_HOST_STAGE_N,2,3,$(t),$(t))))

trunk/mk/install.mk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,24 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
6767
endef
6868

6969
$(foreach target,$(CFG_TARGET_TRIPLES), \
70-
$(eval $(call INSTALL_TARGET_N,$(target),$(CFG_BUILD_TRIPLE))))
70+
$(eval $(call INSTALL_TARGET_N,$(target),$(CFG_HOST_TRIPLE))))
7171

7272
INSTALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
73-
install-target-$(target)-host-$(CFG_BUILD_TRIPLE))
73+
install-target-$(target)-host-$(CFG_HOST_TRIPLE))
7474

7575
install: all install-host install-targets
7676

7777
# Shorthand for build/stageN/bin
78-
HB = $(HBIN$(ISTAGE)_H_$(CFG_BUILD_TRIPLE))
79-
HB2 = $(HBIN2_H_$(CFG_BUILD_TRIPLE))
78+
HB = $(HBIN$(ISTAGE)_H_$(CFG_HOST_TRIPLE))
79+
HB2 = $(HBIN2_H_$(CFG_HOST_TRIPLE))
8080
# Shorthand for build/stageN/lib
81-
HL = $(HLIB$(ISTAGE)_H_$(CFG_BUILD_TRIPLE))
81+
HL = $(HLIB$(ISTAGE)_H_$(CFG_HOST_TRIPLE))
8282
# Shorthand for the prefix bin directory
8383
PHB = $(PREFIX_BIN)
8484
# Shorthand for the prefix bin directory
8585
PHL = $(PREFIX_LIB)
8686

87-
install-host: $(CSREQ$(ISTAGE)_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
87+
install-host: $(CSREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
8888
$(Q)mkdir -p $(PREFIX_BIN)
8989
$(Q)mkdir -p $(PREFIX_LIB)
9090
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1

trunk/mk/llvm.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ endif
3030

3131
endef
3232

33-
$(foreach host,$(CFG_HOST_TRIPLES), \
34-
$(eval $(call DEF_LLVM_RULES,$(host))))
33+
$(foreach target,$(CFG_TARGET_TRIPLES), \
34+
$(eval $(call DEF_LLVM_RULES,$(target))))

trunk/mk/perf.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010

1111

1212
ifdef CFG_PERF_TOOL
13-
rustc-perf$(X): $(CFG_BUILD_TRIPLE)/stage2/bin/rustc$(X)
13+
rustc-perf$(X): $(CFG_HOST_TRIPLE)/stage2/bin/rustc$(X)
1414
@$(call E, perf compile: $@)
15-
$(PERF_STAGE2_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE)) \
15+
$(PERF_STAGE2_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE)) \
1616
-o $@ $(COMPILER_CRATE) >rustc-perf.err 2>&1
1717
$(Q)rm -f $(LIBRUSTC_GLOB)
1818
else
19-
rustc-perf$(X): $(CFG_BUILD_TRIPLE)/stage2/bin/rustc$(X)
19+
rustc-perf$(X): $(CFG_HOST_TRIPLE)/stage2/bin/rustc$(X)
2020
$(Q)touch $@
2121
endif
2222

2323
perf: check-stage2-perf rustc-perf$(X)
24-
$(Q)find $(CFG_BUILD_TRIPLE)/test/perf -name \*.err | xargs cat
24+
$(Q)find $(CFG_HOST_TRIPLE)/test/perf -name \*.err | xargs cat
2525
$(Q)cat rustc-perf.err

0 commit comments

Comments
 (0)