Skip to content

Commit 21cba07

Browse files
committed
---
yaml --- r: 89598 b: refs/heads/master c: ba436a8 h: refs/heads/master v: v3
1 parent c395697 commit 21cba07

File tree

157 files changed

+8909
-3266
lines changed

Some content is hidden

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

157 files changed

+8909
-3266
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: 3899f8da6b3da631a110041384a088403468d225
2+
refs/heads/master: ba436a808243a4a6b9e1c052b2fad9f1a7102ff6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/Makefile.in

Lines changed: 42 additions & 36 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 = $(filter-out $(CFG_BUILD),$(CFG_HOST))
74-
NON_BUILD_TARGET = $(filter-out $(CFG_BUILD),$(CFG_TARGET))
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))
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))
81-
CFG_INFO := $(info cfg: host triples $(CFG_HOST))
82-
CFG_INFO := $(info cfg: target triples $(CFG_TARGET))
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))
8383

84-
ifneq ($(wildcard $(NON_BUILD_HOST)),)
85-
CFG_INFO := $(info cfg: non-build host triples $(NON_BUILD_HOST))
84+
ifneq ($(wildcard $(NON_BUILD_HOST_TRIPLES)),)
85+
CFG_INFO := $(info cfg: non-build host triples $(NON_BUILD_HOST_TRIPLES))
8686
endif
87-
ifneq ($(wildcard $(NON_BUILD_TARGET)),)
88-
CFG_INFO := $(info cfg: non-build target triples $(NON_BUILD_TARGET))
87+
ifneq ($(wildcard $(NON_BUILD_TARGET_TRIPLES)),)
88+
CFG_INFO := $(info cfg: non-build target triples $(NON_BUILD_TARGET_TRIPLES))
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),\
192+
$(foreach target,$(CFG_TARGET_TRIPLES),\
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),\
276+
$(foreach target,$(CFG_TARGET_TRIPLES),\
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), \
350+
$(foreach host,$(CFG_HOST_TRIPLES), \
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
364+
export CFG_BUILD_TRIPLE
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)),$(strip $(3)))
487+
ifneq ($(strip $(CFG_BUILD_TRIPLE)),$(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), \
511-
$(eval $(foreach target,$(CFG_TARGET), \
510+
$(foreach build,$(CFG_HOST_TRIPLES), \
511+
$(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
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), \
526+
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
527527
$$(SREQ$(2)_T_$$(target)_H_$(1)))
528528

529529
endef
530530

531-
$(foreach host,$(CFG_HOST), \
531+
$(foreach host,$(CFG_HOST_TRIPLES), \
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)
536-
rustc-stage2: rustc-stage2-H-$(CFG_BUILD)
537-
rustc-stage3: rustc-stage3-H-$(CFG_BUILD)
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)
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), \
545+
$(foreach host,$(CFG_TARGET_TRIPLES), \
546546
$(eval $(call DEF_RUSTC_TARGET,$(host))))
547547

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

553-
rustc-H-all: $(foreach host,$(CFG_HOST),rustc-H-$(host))
553+
rustc-H-all: $(foreach host,$(CFG_HOST_TRIPLES),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)) $(GENERATED) docs
569+
all: $(SREQ1$(CFG_BUILD_TRIPLE)) $(GENERATED) docs
570570

571571
else
572572

573573
define ALL_TARGET_N
574-
ifneq ($$(findstring $(1),$$(CFG_HOST)),)
574+
ifneq ($$(findstring $(1),$$(CFG_HOST_TRIPLES)),)
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), \
584-
$(foreach host,$(CFG_HOST), \
583+
$(foreach target,$(CFG_TARGET_TRIPLES), \
584+
$(foreach host,$(CFG_HOST_TRIPLES), \
585585
$(eval $(call ALL_TARGET_N,$(target),$(host)))))
586586

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

591591
all: $(ALL_TARGET_RULES) $(GENERATED) docs
@@ -677,6 +677,12 @@ 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+
680686
CFG_INFO := $(info cfg: including install rules)
681687
include $(CFG_SRC_DIR)mk/install.mk
682688
endif

trunk/configure

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

338338

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

341341
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
342342
CFG_BUILD_DIR="$(pwd)/"
@@ -385,21 +385,12 @@ 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"
388391
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
389392
valopt mingw32-cross-path "" "MinGW32 cross compiler path"
390393

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-
403394
# Validate Options
404395
step_msg "validating $CFG_SELF args"
405396
validate_opt
@@ -463,14 +454,12 @@ then
463454
# extract the first 2 version fields, ignore everything else
464455
sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/')
465456

466-
MIN_PV_MAJOR="1"
467-
MIN_PV_MINOR="9"
468457
# these patterns are shell globs, *not* regexps
469458
PV_MAJOR=${PV_MAJOR_MINOR% *}
470459
PV_MINOR=${PV_MAJOR_MINOR#* }
471-
if [ "$PV_MAJOR" -lt "$MIN_PV_MAJOR" ] || [ "$PV_MINOR" -lt "$MIN_PV_MINOR" ]
460+
if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
472461
then
473-
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. Need at least $MIN_PV_MAJOR.$MIN_PV_MINOR. Disabling"
462+
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
474463
BAD_PANDOC=1
475464
fi
476465
fi
@@ -598,25 +587,25 @@ then
598587
fi
599588

600589
# a little post-processing of various config values
590+
601591
CFG_PREFIX=${CFG_PREFIX%/}
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)"
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)"
606595

607596
# copy host-triples to target-triples so that hosts are a subset of targets
608597
V_TEMP=""
609-
for i in $CFG_HOST $CFG_TARGET;
598+
for i in $CFG_HOST_TRIPLES $CFG_TARGET_TRIPLES;
610599
do
611600
echo "$V_TEMP" | grep -qF $i || V_TEMP="$V_TEMP${V_TEMP:+ }$i"
612601
done
613-
CFG_TARGET=$V_TEMP
602+
CFG_TARGET_TRIPLES=$V_TEMP
614603

615604
# check target-specific tool-chains
616-
for i in $CFG_TARGET
605+
for i in $CFG_TARGET_TRIPLES
617606
do
618607
L_CHECK=false
619-
for j in $CFG_SUPPORTED_TARGET
608+
for j in $CFG_SUPPORTED_TARGET_TRIPLES
620609
do
621610
if [ $i = $j ]
622611
then
@@ -646,13 +635,6 @@ do
646635
fi
647636
;;
648637

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-
656638
*)
657639
;;
658640
esac
@@ -682,17 +664,17 @@ do
682664
make_dir $i
683665
done
684666

685-
for t in $CFG_HOST
667+
for t in $CFG_HOST_TRIPLES
686668
do
687669
make_dir $t/llvm
688670
done
689671

690-
for t in $CFG_HOST
672+
for t in $CFG_HOST_TRIPLES
691673
do
692674
make_dir $t/rustllvm
693675
done
694676

695-
for t in $CFG_TARGET
677+
for t in $CFG_TARGET_TRIPLES
696678
do
697679
make_dir $t/rt
698680
for s in 0 1 2 3
@@ -721,9 +703,9 @@ then
721703
CFG_LIBDIR=bin
722704
fi
723705

724-
for h in $CFG_HOST
706+
for h in $CFG_HOST_TRIPLES
725707
do
726-
for t in $CFG_TARGET
708+
for t in $CFG_TARGET_TRIPLES
727709
do
728710
for i in 0 1 2 3
729711
do
@@ -803,7 +785,7 @@ fi
803785
# Configure llvm, only if necessary
804786
step_msg "looking at LLVM"
805787
CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/
806-
for t in $CFG_HOST
788+
for t in $CFG_HOST_TRIPLES
807789
do
808790
do_reconfigure=1
809791

@@ -979,15 +961,20 @@ putvar CFG_OSTYPE
979961
putvar CFG_CPUTYPE
980962
putvar CFG_CONFIGURE_ARGS
981963
putvar CFG_PREFIX
982-
putvar CFG_BUILD
983-
putvar CFG_HOST
984-
putvar CFG_TARGET
964+
putvar CFG_BUILD_TRIPLE
965+
putvar CFG_HOST_TRIPLES
966+
putvar CFG_TARGET_TRIPLES
985967
putvar CFG_C_COMPILER
986968
putvar CFG_LIBDIR
987969
putvar CFG_DISABLE_MANAGE_SUBMODULES
988970
putvar CFG_ANDROID_CROSS_PATH
989971
putvar CFG_MINGW32_CROSS_PATH
990-
putvar CFG_MANDIR
972+
973+
if [ ! -z "$CFG_ENABLE_PAX_FLAGS" ]
974+
then
975+
putvar CFG_ENABLE_PAX_FLAGS
976+
putvar CFG_PAXCTL
977+
fi
991978

992979
# Avoid spurious warnings from clang by feeding it original source on
993980
# ccache-miss rather than preprocessed input.
@@ -1028,7 +1015,7 @@ fi
10281015
putvar CFG_LLVM_ROOT
10291016
putvar CFG_LLVM_SRC_DIR
10301017

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

trunk/doc/rust.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,6 @@ 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
572571
* `concat_idents!` : create a new identifier by concatenating the arguments
573572

574573
# Crates and source files

0 commit comments

Comments
 (0)