Skip to content

Commit a8fcaa6

Browse files
committed
---
yaml --- r: 46463 b: refs/heads/auto c: 15c0c35 h: refs/heads/master i: 46461: 2b6d014 46459: 5024fa6 46455: e605eef 46447: fc87167 46431: 4211167 46399: ddcb6a7 46335: f07af2f v: v3
1 parent f1b6923 commit a8fcaa6

File tree

110 files changed

+786
-830
lines changed

Some content is hidden

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

110 files changed

+786
-830
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: dab6a852303f68c2ed6c17abaca1d0728d9cf618
17+
refs/heads/auto: 15c0c35352720efd32bcfc5f4ae05b95f05cd1c0

branches/auto/Makefile.in

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

7272
MKFILE_DEPS := config.stamp $(call rwildcard,$(CFG_SRC_DIR)mk/,*)
73-
NON_HOST_TRIPLES = $(filter-out $(CFG_HOST_TRIPLE),$(CFG_TARGET_TRIPLES))
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))
7475

7576
ifneq ($(MAKE_RESTARTS),)
7677
CFG_INFO := $(info cfg: make restarts: $(MAKE_RESTARTS))
7778
endif
7879

79-
CFG_INFO := $(info cfg: shell host triple $(CFG_HOST_TRIPLE))
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))
8083

81-
ifneq ($(wildcard $(NON_HOST_TRIPLES)),)
82-
CFG_INFO := $(info cfg: non host triples $(NON_HOST_TRIPLES))
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))
8389
endif
8490

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

273279
endef
274280

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

278284
######################################################################
279285
# Exports for sub-utilities
@@ -285,7 +291,7 @@ $(foreach target,$(CFG_TARGET_TRIPLES), \
285291
export CFG_SRC_DIR
286292
export CFG_BUILD_DIR
287293
export CFG_VERSION
288-
export CFG_HOST_TRIPLE
294+
export CFG_BUILD_TRIPLE
289295
export CFG_LLVM_ROOT
290296
export CFG_ENABLE_MINGW_CROSS
291297
export CFG_PREFIX
@@ -409,7 +415,7 @@ CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
409415
# if you're building a cross config, the host->* parts are
410416
# effectively stage1, since it uses the just-built stage0.
411417
ifeq ($(1),0)
412-
ifneq ($(strip $(CFG_HOST_TRIPLE)),$(strip $(3)))
418+
ifneq ($(strip $(CFG_BUILD_TRIPLE)),$(strip $(3)))
413419
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
414420
endif
415421
endif
@@ -430,7 +436,7 @@ PERF_STAGE$(1)_T_$(2)_H_$(3) := \
430436

431437
endef
432438

433-
$(foreach build,$(CFG_TARGET_TRIPLES), \
439+
$(foreach build,$(CFG_HOST_TRIPLES), \
434440
$(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
435441
$(eval $(foreach stage,$(STAGES), \
436442
$(eval $(call SREQ,$(stage),$(target),$(build))))))))
@@ -451,13 +457,13 @@ rustc-stage$(2)-H-$(1): \
451457

452458
endef
453459

454-
$(foreach host,$(CFG_TARGET_TRIPLES), \
460+
$(foreach host,$(CFG_HOST_TRIPLES), \
455461
$(eval $(foreach stage,1 2 3, \
456462
$(eval $(call DEF_RUSTC_STAGE_TARGET,$(host),$(stage))))))
457463

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)
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)
461467

462468
define DEF_RUSTC_TARGET
463469
# $(1) == architecture
@@ -468,12 +474,12 @@ endef
468474
$(foreach host,$(CFG_TARGET_TRIPLES), \
469475
$(eval $(call DEF_RUSTC_TARGET,$(host))))
470476

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)
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)
475481

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

478484
######################################################################
479485
# Entrypoint rule
@@ -489,19 +495,27 @@ CFG_INFO := $(info cfg: *** stage2 and later will not be built ***)
489495
CFG_INFO := $(info cfg:)
490496

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

494500
else
495501

496502
define ALL_TARGET_N
503+
ifneq ($$(findstring $(1),$$(CFG_HOST_TRIPLES)),)
504+
# This is a host
497505
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
498510
endef
499511

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

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

506520
all: $(ALL_TARGET_RULES) $(GENERATED) docs
507521

branches/auto/configure

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

303303

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

306306
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
307307
CFG_BUILD_DIR="$(pwd)/"
@@ -346,8 +346,9 @@ 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 host-triple "${DEFAULT_HOST_TRIPLE}" "LLVM host triple"
350-
valopt target-triples "${CFG_HOST_TRIPLE}" "LLVM target triples"
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"
351352

352353
# Validate Options
353354
step_msg "validating $CFG_SELF args"
@@ -532,10 +533,6 @@ fi
532533

533534
CFG_PREFIX=${CFG_PREFIX%/}
534535
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
539536

540537
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
541538
then
@@ -562,13 +559,13 @@ do
562559
done
563560

564561
make_dir llvm
565-
for t in $CFG_TARGET_TRIPLES
562+
for t in $CFG_HOST_TRIPLES
566563
do
567564
make_dir llvm/$t
568565
done
569566

570567
make_dir rustllvm
571-
for t in $CFG_TARGET_TRIPLES
568+
for t in $CFG_HOST_TRIPLES
572569
do
573570
make_dir rustllvm/$t
574571
done
@@ -593,7 +590,7 @@ then
593590
CFG_LIBDIR=bin
594591
fi
595592

596-
for h in $CFG_TARGET_TRIPLES
593+
for h in $CFG_HOST_TRIPLES
597594
do
598595
for t in $CFG_TARGET_TRIPLES
599596
do
@@ -669,7 +666,7 @@ fi
669666
# Configure llvm, only if necessary
670667
step_msg "looking at LLVM"
671668
CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/
672-
for t in $CFG_TARGET_TRIPLES
669+
for t in $CFG_HOST_TRIPLES
673670
do
674671
do_reconfigure=1
675672

@@ -819,6 +816,8 @@ putvar CFG_OSTYPE
819816
putvar CFG_CPUTYPE
820817
putvar CFG_CONFIGURE_ARGS
821818
putvar CFG_PREFIX
819+
putvar CFG_BUILD_TRIPLE
820+
putvar CFG_HOST_TRIPLES
822821
putvar CFG_TARGET_TRIPLES
823822
putvar CFG_C_COMPILER
824823
putvar CFG_LIBDIR
@@ -854,7 +853,7 @@ fi
854853
putvar CFG_LLVM_ROOT
855854
putvar CFG_LLVM_SRC_DIR
856855

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

branches/auto/doc/tutorial-tasks.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ concurrently:
157157

158158
~~~~
159159
use task::spawn;
160-
use comm::{stream, Port, Chan};
160+
use pipes::{stream, Port, Chan};
161161
162162
let (port, chan): (Port<int>, Chan<int>) = stream();
163163
@@ -178,7 +178,7 @@ stream for sending and receiving integers (the left-hand side of the `let`,
178178
a tuple into its component parts).
179179

180180
~~~~
181-
# use comm::{stream, Chan, Port};
181+
# use pipes::{stream, Chan, Port};
182182
let (port, chan): (Port<int>, Chan<int>) = stream();
183183
~~~~
184184

@@ -189,7 +189,7 @@ spawns the child task.
189189
~~~~
190190
# use task::{spawn};
191191
# use task::spawn;
192-
# use comm::{stream, Port, Chan};
192+
# use pipes::{stream, Port, Chan};
193193
# fn some_expensive_computation() -> int { 42 }
194194
# let (port, chan) = stream();
195195
do spawn || {
@@ -209,7 +209,7 @@ computation, then waits for the child's result to arrive on the
209209
port:
210210

211211
~~~~
212-
# use comm::{stream, Port, Chan};
212+
# use pipes::{stream, Port, Chan};
213213
# fn some_other_expensive_computation() {}
214214
# let (port, chan) = stream::<int>();
215215
# chan.send(0);
@@ -225,7 +225,7 @@ following program is ill-typed:
225225

226226
~~~ {.xfail-test}
227227
# use task::{spawn};
228-
# use comm::{stream, Port, Chan};
228+
# use pipes::{stream, Port, Chan};
229229
# fn some_expensive_computation() -> int { 42 }
230230
let (port, chan) = stream();
231231
@@ -245,7 +245,7 @@ Instead we can use a `SharedChan`, a type that allows a single
245245

246246
~~~
247247
# use task::spawn;
248-
use comm::{stream, SharedChan};
248+
use pipes::{stream, SharedChan};
249249
250250
let (port, chan) = stream();
251251
let chan = SharedChan(chan);
@@ -278,7 +278,7 @@ might look like the example below.
278278

279279
~~~
280280
# use task::spawn;
281-
# use comm::{stream, Port, Chan};
281+
# use pipes::{stream, Port, Chan};
282282
283283
// Create a vector of ports, one for each child task
284284
let ports = do vec::from_fn(3) |init_val| {
@@ -393,7 +393,7 @@ internally, with additional logic to wait for the child task to finish
393393
before returning. Hence:
394394

395395
~~~
396-
# use comm::{stream, Chan, Port};
396+
# use pipes::{stream, Chan, Port};
397397
# use task::{spawn, try};
398398
# fn sleep_forever() { loop { task::yield() } }
399399
# do task::try {
@@ -468,7 +468,7 @@ Here is the function that implements the child task:
468468

469469
~~~~
470470
# use std::comm::DuplexStream;
471-
# use comm::{Port, Chan};
471+
# use pipes::{Port, Chan};
472472
fn stringifier(channel: &DuplexStream<~str, uint>) {
473473
let mut value: uint;
474474
loop {
@@ -491,7 +491,7 @@ Here is the code for the parent task:
491491

492492
~~~~
493493
# use std::comm::DuplexStream;
494-
# use comm::{Port, Chan};
494+
# use pipes::{Port, Chan};
495495
# use task::spawn;
496496
# fn stringifier(channel: &DuplexStream<~str, uint>) {
497497
# let mut value: uint;

branches/auto/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_TARGET_TRIPLES), \
17+
$(foreach host, $(CFG_HOST_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_HOST_TRIPLE)/test \
36+
$(Q)find rustllvm rt $(CFG_BUILD_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_HOST_TRIPLE)\
44+
$(Q)find rustllvm rt $(CFG_BUILD_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_TARGET_TRIPLES), \
96+
$(foreach host, $(CFG_HOST_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_TARGET_TRIPLES), \
130+
$(foreach host, $(CFG_HOST_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_TARGET
135+
define DEF_CLEAN_LLVM_HOST
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 target, $(CFG_TARGET_TRIPLES), \
146-
$(eval $(call DEF_CLEAN_LLVM_TARGET,$(target))))
145+
$(foreach host, $(CFG_HOST_TRIPLES), \
146+
$(eval $(call DEF_CLEAN_LLVM_HOST,$(host))))

branches/auto/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_HOST_TRIPLE))/rustdoc$(X)
174+
RUSTDOC = $(HBIN2_H_$(CFG_BUILD_TRIPLE))/rustdoc$(X)
175175

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

branches/auto/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_TARGET_TRIPLES), \
118+
$(foreach t,$(CFG_HOST_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))))

0 commit comments

Comments
 (0)