Skip to content

Commit cd5d9e2

Browse files
committed
---
yaml --- r: 89599 b: refs/heads/master c: e0c01ca h: refs/heads/master i: 89597: c395697 89595: 77008e5 89591: 3bd42f8 89583: ed7b85c 89567: fa0ceab 89535: 311ce0b 89471: 4829c46 89343: 7309feb 89087: e51f99a v: v3
1 parent 21cba07 commit cd5d9e2

File tree

156 files changed

+3259
-8904
lines changed

Some content is hidden

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

156 files changed

+3259
-8904
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: ba436a808243a4a6b9e1c052b2fad9f1a7102ff6
2+
refs/heads/master: e0c01ca15383513eb2981b6ee532c33ea546b4a8
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/Makefile.in

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,22 @@ 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_BUILD_HOST = $(filter-out $(CFG_BUILD),$(CFG_HOST))
74+
NON_BUILD_TARGET = $(filter-out $(CFG_BUILD),$(CFG_TARGET))
7575

7676
ifneq ($(MAKE_RESTARTS),)
7777
CFG_INFO := $(info cfg: make restarts: $(MAKE_RESTARTS))
7878
endif
7979

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))
80+
CFG_INFO := $(info cfg: build triple $(CFG_BUILD))
81+
CFG_INFO := $(info cfg: host triples $(CFG_HOST))
82+
CFG_INFO := $(info cfg: target triples $(CFG_TARGET))
8383

84-
ifneq ($(wildcard $(NON_BUILD_HOST_TRIPLES)),)
85-
CFG_INFO := $(info cfg: non-build host triples $(NON_BUILD_HOST_TRIPLES))
84+
ifneq ($(wildcard $(NON_BUILD_HOST)),)
85+
CFG_INFO := $(info cfg: non-build host triples $(NON_BUILD_HOST))
8686
endif
87-
ifneq ($(wildcard $(NON_BUILD_TARGET_TRIPLES)),)
88-
CFG_INFO := $(info cfg: non-build target triples $(NON_BUILD_TARGET_TRIPLES))
87+
ifneq ($(wildcard $(NON_BUILD_TARGET)),)
88+
CFG_INFO := $(info cfg: non-build target triples $(NON_BUILD_TARGET))
8989
endif
9090

9191
CFG_RUSTC_FLAGS := $(RUSTFLAGS)
@@ -189,7 +189,7 @@ S := $(CFG_SRC_DIR)
189189
define DEF_X
190190
X_$(1) := $(CFG_EXE_SUFFIX_$(1))
191191
endef
192-
$(foreach target,$(CFG_TARGET_TRIPLES),\
192+
$(foreach target,$(CFG_TARGET),\
193193
$(eval $(call DEF_X,$(target))))
194194

195195
# Look in doc and src dirs.
@@ -249,12 +249,12 @@ endef
249249
# by $(2) with a space character prefix, which invalidates the
250250
# construction $(1)$(2).
251251
define CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT
252-
$(Q)MATCHES="$(filter-out %$(3),$(wildcard $(1)/$(2)))"; if [ -n "$$MATCHES" ] ; then echo "Warning: there are previous" \'$(2)\' "libraries:" $$MATCHES; fi
252+
$(Q)MATCHES="$(filter-out %$(3),$(wildcard $(1)/$(2)))"; if [ -n "$$MATCHES" ] ; then echo "warning: there are previous" \'$(2)\' "libraries:" $$MATCHES; fi
253253
endef
254254

255255
# Same interface as above, but deletes rather than just listing the files.
256256
define REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT
257-
$(Q)MATCHES="$(filter-out %$(3),$(wildcard $(1)/$(2)))"; if [ -n "$$MATCHES" ] ; then echo "Warning: removing previous" \'$(2)\' "libraries:" $$MATCHES; rm $$MATCHES ; fi
257+
$(Q)MATCHES="$(filter-out %$(3),$(wildcard $(1)/$(2)))"; if [ -n "$$MATCHES" ] ; then echo "warning: removing previous" \'$(2)\' "libraries:" $$MATCHES; rm $$MATCHES ; fi
258258
endef
259259

260260
# We use a different strategy for LIST_ALL_OLD_GLOB_MATCHES_EXCEPT
@@ -265,15 +265,15 @@ endef
265265
# be run at the outset of a command list in a rule.)
266266
ifdef VERBOSE
267267
define LIST_ALL_OLD_GLOB_MATCHES_EXCEPT
268-
@echo "Info: now are following matches for" '$(2)' "libraries:"
268+
@echo "info: now are following matches for" '$(2)' "libraries:"
269269
@( cd $(1) && ( ls $(2) 2>/dev/null || true ) | grep -v $(3) || true )
270270
endef
271271
else
272272
define LIST_ALL_OLD_GLOB_MATCHES_EXCEPT
273273
endef
274274
endif
275275

276-
$(foreach target,$(CFG_TARGET_TRIPLES),\
276+
$(foreach target,$(CFG_TARGET),\
277277
$(eval $(call DEF_LIBS,$(target))))
278278

279279
######################################################################
@@ -347,7 +347,7 @@ LLC_$(1)=$$(CFG_LLVM_INST_DIR_$(1))/bin/llc$$(X_$(1))
347347

348348
endef
349349

350-
$(foreach host,$(CFG_HOST_TRIPLES), \
350+
$(foreach host,$(CFG_HOST), \
351351
$(eval $(call DEF_LLVM_VARS,$(host))))
352352

353353
######################################################################
@@ -361,7 +361,7 @@ export CFG_SRC_DIR
361361
export CFG_BUILD_DIR
362362
export CFG_VERSION
363363
export CFG_VERSION_WIN
364-
export CFG_BUILD_TRIPLE
364+
export CFG_BUILD
365365
export CFG_LLVM_ROOT
366366
export CFG_ENABLE_MINGW_CROSS
367367
export CFG_PREFIX
@@ -484,7 +484,7 @@ CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
484484
# if you're building a cross config, the host->* parts are
485485
# effectively stage1, since it uses the just-built stage0.
486486
ifeq ($(1),0)
487-
ifneq ($(strip $(CFG_BUILD_TRIPLE)),$(strip $(3)))
487+
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
488488
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
489489
endif
490490
endif
@@ -507,8 +507,8 @@ PERF_STAGE$(1)_T_$(2)_H_$(3) := \
507507

508508
endef
509509

510-
$(foreach build,$(CFG_HOST_TRIPLES), \
511-
$(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
510+
$(foreach build,$(CFG_HOST), \
511+
$(eval $(foreach target,$(CFG_TARGET), \
512512
$(eval $(foreach stage,$(STAGES), \
513513
$(eval $(call SREQ,$(stage),$(target),$(build))))))))
514514

@@ -523,34 +523,34 @@ define DEF_RUSTC_STAGE_TARGET
523523
# $(2) == stage
524524

525525
rustc-stage$(2)-H-$(1): \
526-
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
526+
$$(foreach target,$$(CFG_TARGET), \
527527
$$(SREQ$(2)_T_$$(target)_H_$(1)))
528528

529529
endef
530530

531-
$(foreach host,$(CFG_HOST_TRIPLES), \
531+
$(foreach host,$(CFG_HOST), \
532532
$(eval $(foreach stage,1 2 3, \
533533
$(eval $(call DEF_RUSTC_STAGE_TARGET,$(host),$(stage))))))
534534

535-
rustc-stage1: rustc-stage1-H-$(CFG_BUILD_TRIPLE)
536-
rustc-stage2: rustc-stage2-H-$(CFG_BUILD_TRIPLE)
537-
rustc-stage3: rustc-stage3-H-$(CFG_BUILD_TRIPLE)
535+
rustc-stage1: rustc-stage1-H-$(CFG_BUILD)
536+
rustc-stage2: rustc-stage2-H-$(CFG_BUILD)
537+
rustc-stage3: rustc-stage3-H-$(CFG_BUILD)
538538

539539
define DEF_RUSTC_TARGET
540540
# $(1) == architecture
541541

542542
rustc-H-$(1): rustc-stage2-H-$(1)
543543
endef
544544

545-
$(foreach host,$(CFG_TARGET_TRIPLES), \
545+
$(foreach host,$(CFG_TARGET), \
546546
$(eval $(call DEF_RUSTC_TARGET,$(host))))
547547

548-
rustc-stage1: rustc-stage1-H-$(CFG_BUILD_TRIPLE)
549-
rustc-stage2: rustc-stage2-H-$(CFG_BUILD_TRIPLE)
550-
rustc-stage3: rustc-stage3-H-$(CFG_BUILD_TRIPLE)
551-
rustc: rustc-H-$(CFG_BUILD_TRIPLE)
548+
rustc-stage1: rustc-stage1-H-$(CFG_BUILD)
549+
rustc-stage2: rustc-stage2-H-$(CFG_BUILD)
550+
rustc-stage3: rustc-stage3-H-$(CFG_BUILD)
551+
rustc: rustc-H-$(CFG_BUILD)
552552

553-
rustc-H-all: $(foreach host,$(CFG_HOST_TRIPLES),rustc-H-$(host))
553+
rustc-H-all: $(foreach host,$(CFG_HOST),rustc-H-$(host))
554554

555555
######################################################################
556556
# Entrypoint rule
@@ -566,12 +566,12 @@ CFG_INFO := $(info cfg: *** stage2 and later will not be built ***)
566566
CFG_INFO := $(info cfg:)
567567

568568
#XXX This is surely busted
569-
all: $(SREQ1$(CFG_BUILD_TRIPLE)) $(GENERATED) docs
569+
all: $(SREQ1$(CFG_BUILD)) $(GENERATED) docs
570570

571571
else
572572

573573
define ALL_TARGET_N
574-
ifneq ($$(findstring $(1),$$(CFG_HOST_TRIPLES)),)
574+
ifneq ($$(findstring $(1),$$(CFG_HOST)),)
575575
# This is a host
576576
all-target-$(1)-host-$(2): $$(CSREQ2_T_$(1)_H_$(2))
577577
else
@@ -580,12 +580,12 @@ all-target-$(1)-host-$(2): $$(SREQ2_T_$(1)_H_$(2))
580580
endif
581581
endef
582582

583-
$(foreach target,$(CFG_TARGET_TRIPLES), \
584-
$(foreach host,$(CFG_HOST_TRIPLES), \
583+
$(foreach target,$(CFG_TARGET), \
584+
$(foreach host,$(CFG_HOST), \
585585
$(eval $(call ALL_TARGET_N,$(target),$(host)))))
586586

587-
ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
588-
$(foreach host,$(CFG_HOST_TRIPLES), \
587+
ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET), \
588+
$(foreach host,$(CFG_HOST), \
589589
all-target-$(target)-host-$(host)))
590590

591591
all: $(ALL_TARGET_RULES) $(GENERATED) docs
@@ -677,12 +677,6 @@ ifneq ($(findstring clean,$(MAKECMDGOALS)),)
677677
endif
678678

679679
ifneq ($(findstring install,$(MAKECMDGOALS)),)
680-
ifdef DESTDIR
681-
CFG_INFO := $(info cfg: setting CFG_PREFIX via DESTDIR, $(DESTDIR)/$(CFG_PREFIX))
682-
CFG_PREFIX:=$(DESTDIR)/$(CFG_PREFIX)
683-
export CFG_PREFIX
684-
endif
685-
686680
CFG_INFO := $(info cfg: including install rules)
687681
include $(CFG_SRC_DIR)mk/install.mk
688682
endif

trunk/configure

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ then
336336
fi
337337

338338

339-
DEFAULT_BUILD_TRIPLE="${CFG_CPUTYPE}-${CFG_OSTYPE}"
339+
DEFAULT_BUILD="${CFG_CPUTYPE}-${CFG_OSTYPE}"
340340

341341
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
342342
CFG_BUILD_DIR="$(pwd)/"
@@ -385,12 +385,21 @@ opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-
385385
valopt prefix "/usr/local" "set installation prefix"
386386
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
387387
valopt llvm-root "" "set LLVM root"
388-
valopt build-triple "${DEFAULT_BUILD_TRIPLE}" "LLVM build triple"
389-
valopt host-triples "${CFG_BUILD_TRIPLE}" "LLVM host triples"
390-
valopt target-triples "${CFG_HOST_TRIPLES}" "LLVM target triples"
391388
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
392389
valopt mingw32-cross-path "" "MinGW32 cross compiler path"
393390

391+
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
392+
valopt host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
393+
valopt target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
394+
395+
valopt localstatedir "/var/lib" "local state directory"
396+
valopt sysconfdir "/etc" "install system configuration files"
397+
398+
valopt datadir "${CFG_PREFIX}/share" "install data"
399+
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
400+
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
401+
valopt libdir "${CFG_PREFIX}/lib" "install libraries"
402+
394403
# Validate Options
395404
step_msg "validating $CFG_SELF args"
396405
validate_opt
@@ -454,12 +463,14 @@ then
454463
# extract the first 2 version fields, ignore everything else
455464
sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/')
456465

466+
MIN_PV_MAJOR="1"
467+
MIN_PV_MINOR="9"
457468
# these patterns are shell globs, *not* regexps
458469
PV_MAJOR=${PV_MAJOR_MINOR% *}
459470
PV_MINOR=${PV_MAJOR_MINOR#* }
460-
if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
471+
if [ "$PV_MAJOR" -lt "$MIN_PV_MAJOR" ] || [ "$PV_MINOR" -lt "$MIN_PV_MINOR" ]
461472
then
462-
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
473+
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. Need at least $MIN_PV_MAJOR.$MIN_PV_MINOR. Disabling"
463474
BAD_PANDOC=1
464475
fi
465476
fi
@@ -587,25 +598,25 @@ then
587598
fi
588599

589600
# a little post-processing of various config values
590-
591601
CFG_PREFIX=${CFG_PREFIX%/}
592-
CFG_HOST_TRIPLES="$(echo $CFG_HOST_TRIPLES | tr ',' ' ')"
593-
CFG_TARGET_TRIPLES="$(echo $CFG_TARGET_TRIPLES | tr ',' ' ')"
594-
CFG_SUPPORTED_TARGET_TRIPLES="$(grep ^CC_*=* $CFG_SRC_DIR/mk/platform.mk | sed -e 's/^CC_//' -e 's/\([^=]*\).*/\1/' | xargs)"
602+
CFG_MANDIR=${CFG_MANDIR%/}
603+
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
604+
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
605+
CFG_SUPPORTED_TARGET="$(grep ^CC_*=* $CFG_SRC_DIR/mk/platform.mk | sed -e 's/^CC_//' -e 's/\([^=]*\).*/\1/' | xargs)"
595606

596607
# copy host-triples to target-triples so that hosts are a subset of targets
597608
V_TEMP=""
598-
for i in $CFG_HOST_TRIPLES $CFG_TARGET_TRIPLES;
609+
for i in $CFG_HOST $CFG_TARGET;
599610
do
600611
echo "$V_TEMP" | grep -qF $i || V_TEMP="$V_TEMP${V_TEMP:+ }$i"
601612
done
602-
CFG_TARGET_TRIPLES=$V_TEMP
613+
CFG_TARGET=$V_TEMP
603614

604615
# check target-specific tool-chains
605-
for i in $CFG_TARGET_TRIPLES
616+
for i in $CFG_TARGET
606617
do
607618
L_CHECK=false
608-
for j in $CFG_SUPPORTED_TARGET_TRIPLES
619+
for j in $CFG_SUPPORTED_TARGET
609620
do
610621
if [ $i = $j ]
611622
then
@@ -635,6 +646,13 @@ do
635646
fi
636647
;;
637648

649+
arm-apple-darwin)
650+
if [ $CFG_OSTYPE != apple-darwin ]
651+
then
652+
err "The iOS target is only supported on Mac OS X"
653+
fi
654+
;;
655+
638656
*)
639657
;;
640658
esac
@@ -664,17 +682,17 @@ do
664682
make_dir $i
665683
done
666684

667-
for t in $CFG_HOST_TRIPLES
685+
for t in $CFG_HOST
668686
do
669687
make_dir $t/llvm
670688
done
671689

672-
for t in $CFG_HOST_TRIPLES
690+
for t in $CFG_HOST
673691
do
674692
make_dir $t/rustllvm
675693
done
676694

677-
for t in $CFG_TARGET_TRIPLES
695+
for t in $CFG_TARGET
678696
do
679697
make_dir $t/rt
680698
for s in 0 1 2 3
@@ -703,9 +721,9 @@ then
703721
CFG_LIBDIR=bin
704722
fi
705723

706-
for h in $CFG_HOST_TRIPLES
724+
for h in $CFG_HOST
707725
do
708-
for t in $CFG_TARGET_TRIPLES
726+
for t in $CFG_TARGET
709727
do
710728
for i in 0 1 2 3
711729
do
@@ -785,7 +803,7 @@ fi
785803
# Configure llvm, only if necessary
786804
step_msg "looking at LLVM"
787805
CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/
788-
for t in $CFG_HOST_TRIPLES
806+
for t in $CFG_HOST
789807
do
790808
do_reconfigure=1
791809

@@ -961,20 +979,15 @@ putvar CFG_OSTYPE
961979
putvar CFG_CPUTYPE
962980
putvar CFG_CONFIGURE_ARGS
963981
putvar CFG_PREFIX
964-
putvar CFG_BUILD_TRIPLE
965-
putvar CFG_HOST_TRIPLES
966-
putvar CFG_TARGET_TRIPLES
982+
putvar CFG_BUILD
983+
putvar CFG_HOST
984+
putvar CFG_TARGET
967985
putvar CFG_C_COMPILER
968986
putvar CFG_LIBDIR
969987
putvar CFG_DISABLE_MANAGE_SUBMODULES
970988
putvar CFG_ANDROID_CROSS_PATH
971989
putvar CFG_MINGW32_CROSS_PATH
972-
973-
if [ ! -z "$CFG_ENABLE_PAX_FLAGS" ]
974-
then
975-
putvar CFG_ENABLE_PAX_FLAGS
976-
putvar CFG_PAXCTL
977-
fi
990+
putvar CFG_MANDIR
978991

979992
# Avoid spurious warnings from clang by feeding it original source on
980993
# ccache-miss rather than preprocessed input.
@@ -1015,7 +1028,7 @@ fi
10151028
putvar CFG_LLVM_ROOT
10161029
putvar CFG_LLVM_SRC_DIR
10171030

1018-
for t in $CFG_HOST_TRIPLES
1031+
for t in $CFG_HOST
10191032
do
10201033
CFG_LLVM_BUILD_DIR=$(echo CFG_LLVM_BUILD_DIR_${t} | tr - _)
10211034
CFG_LLVM_INST_DIR=$(echo CFG_LLVM_INST_DIR_${t} | tr - _)

trunk/doc/rust.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ This requirement most often affects name-designator pairs when they occur at the
568568
* `log_syntax!` : print out the arguments at compile time
569569
* `trace_macros!` : supply `true` or `false` to enable or disable macro expansion logging
570570
* `stringify!` : turn the identifier argument into a string literal
571+
* `concat!` : concatenates a comma-separated list of literals
571572
* `concat_idents!` : create a new identifier by concatenating the arguments
572573

573574
# Crates and source files

0 commit comments

Comments
 (0)