Skip to content

Commit b1b5c92

Browse files
committed
---
yaml --- r: 157499 b: refs/heads/snap-stage3 c: 70fe20a h: refs/heads/master i: 157497: 5efd0b0 157495: e27489b v: v3
1 parent 4f3e834 commit b1b5c92

File tree

270 files changed

+3111
-5024
lines changed

Some content is hidden

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

270 files changed

+3111
-5024
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 065caf34f5ff29e04605f95d9c5d511af219439a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a6883d40545903939538bb4e52465e147e061a39
4+
refs/heads/snap-stage3: 70fe20a69827a2b1abfef338c83f9ec9be7c9376
55
refs/heads/try: 0ee4d8b0b112c608646fa75463ab4dc59132efd9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/configure

Lines changed: 48 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -151,22 +151,11 @@ validate_opt () {
151151
done
152152
}
153153

154-
# `valopt OPTION_NAME DEFAULT DOC` extracts a string-valued option
155-
# from command line, using provided default value for the option if
156-
# not present, and saves it to the generated config.mk.
157-
#
158-
# `valopt_nosave` is much the same, except that it does not save the
159-
# result to config.mk (instead the script should use `putvar` itself
160-
# later on to save it). `valopt_core` is the core upon which the
161-
# other two are built.
162-
163-
valopt_core() {
164-
VAL_OPTIONS="$VAL_OPTIONS $2"
154+
valopt() {
155+
VAL_OPTIONS="$VAL_OPTIONS $1"
165156

166-
local SAVE=$1
167-
local OP=$2
168-
local DEFAULT=$3
169-
shift
157+
local OP=$1
158+
local DEFAULT=$2
170159
shift
171160
shift
172161
local DOC="$*"
@@ -183,10 +172,7 @@ valopt_core() {
183172
eval $V=$val
184173
fi
185174
done
186-
if [ "$SAVE" = "save" ]
187-
then
188-
putvar $V
189-
fi
175+
putvar $V
190176
else
191177
if [ -z "$DEFAULT" ]
192178
then
@@ -197,30 +183,11 @@ valopt_core() {
197183
fi
198184
}
199185

200-
valopt_nosave() {
201-
valopt_core nosave "$@"
202-
}
203-
204-
valopt() {
205-
valopt_core save "$@"
206-
}
207-
208-
# `opt OPTION_NAME DEFAULT DOC` extracts a boolean-valued option from
209-
# command line, using the provided default value (0/1) for the option
210-
# if not present, and saves it to the generated config.mk.
211-
#
212-
# `opt_nosave` is much the same, except that it does not save the
213-
# result to config.mk (instead the script should use `putvar` itself
214-
# later on to save it). `opt_core` is the core upon which the other
215-
# two are built.
216-
217-
opt_core() {
218-
BOOL_OPTIONS="$BOOL_OPTIONS $2"
186+
opt() {
187+
BOOL_OPTIONS="$BOOL_OPTIONS $1"
219188

220-
local SAVE=$1
221-
local OP=$2
222-
local DEFAULT=$3
223-
shift
189+
local OP=$1
190+
local DEFAULT=$2
224191
shift
225192
shift
226193
local DOC="$*"
@@ -244,10 +211,7 @@ opt_core() {
244211
FLAG=$(echo $FLAG | tr 'a-z' 'A-Z')
245212
local V="CFG_${FLAG}_${OP}"
246213
eval $V=1
247-
if [ "$SAVE" = "save" ]
248-
then
249-
putvar $V
250-
fi
214+
putvar $V
251215
fi
252216
done
253217
else
@@ -259,14 +223,6 @@ opt_core() {
259223
fi
260224
}
261225

262-
opt_nosave() {
263-
opt_core nosave "$@"
264-
}
265-
266-
opt() {
267-
opt_core save "$@"
268-
}
269-
270226
envopt() {
271227
local NAME=$1
272228
local V="CFG_${NAME}"
@@ -455,7 +411,6 @@ VAL_OPTIONS=""
455411

456412
opt valgrind 0 "run tests with valgrind (memcheck by default)"
457413
opt helgrind 0 "run tests with helgrind instead of memcheck"
458-
opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"
459414
opt docs 1 "build documentation"
460415
opt optimize 1 "build optimized rust code"
461416
opt optimize-cxx 1 "build optimized C++ code"
@@ -466,40 +421,38 @@ opt llvm-assertions 1 "build LLVM with assertions"
466421
opt debug 1 "build with extra debug fun"
467422
opt ratchet-bench 0 "ratchet benchmarks"
468423
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
424+
opt manage-submodules 1 "let the build manage the git submodules"
469425
opt mingw-cross 0 "cross-compile for win32 using mingw"
426+
opt clang 0 "prefer clang to gcc for building the runtime"
470427
opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
471428
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
429+
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
472430
opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
473431
opt rpath 0 "build rpaths into rustc itself"
474432
opt nightly 0 "build nightly packages"
475433
opt verify-install 1 "verify installed binaries work"
434+
opt jemalloc 1 "build liballoc with jemalloc"
476435
# This is used by the automation to produce single-target nightlies
477436
opt dist-host-only 0 "only install bins for the host architecture"
478-
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
479-
opt jemalloc 1 "build liballoc with jemalloc"
437+
valopt prefix "/usr/local" "set installation prefix"
438+
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
439+
valopt llvm-root "" "set LLVM root"
440+
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
441+
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
442+
valopt mingw32-cross-path "" "MinGW32 cross compiler path"
443+
444+
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
445+
valopt host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
446+
valopt target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
480447

481448
valopt localstatedir "/var/lib" "local state directory"
482449
valopt sysconfdir "/etc" "install system configuration files"
483450

484451
valopt datadir "${CFG_PREFIX}/share" "install data"
485452
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
486-
valopt llvm-root "" "set LLVM root"
487-
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
488-
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
489-
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
490-
valopt mingw32-cross-path "" "MinGW32 cross compiler path"
453+
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
491454

492-
# Many of these are saved below during the "writing configuration" step
493-
# (others are conditionally saved).
494-
opt_nosave manage-submodules 1 "let the build manage the git submodules"
495-
opt_nosave clang 0 "prefer clang to gcc for building the runtime"
496-
497-
valopt_nosave prefix "/usr/local" "set installation prefix"
498-
valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
499-
valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
500-
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
501-
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
502-
valopt_nosave release-channel "dev" "the name of the release channel to build"
455+
valopt release-channel "dev" "the name of the release channel to build"
503456

504457
# On windows we just store the libraries in the bin directory because
505458
# there's no rpath. This is where the build system itself puts libraries;
@@ -537,8 +490,8 @@ esac
537490
if [ ! -z "$CFG_ENABLE_NIGHTLY" ]
538491
then
539492
CFG_RELEASE_CHANNEL=nightly
493+
putvar CFG_RELEASE_CHANNEL
540494
fi
541-
putvar CFG_RELEASE_CHANNEL
542495

543496
step_msg "looking for build programs"
544497

@@ -651,27 +604,17 @@ then
651604
err "no local rust to use"
652605
fi
653606

654-
CMD="${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF}"
655-
LRV=`$CMD --version`
656-
if [ $? -ne 0 ]
657-
then
658-
step_msg "failure while running $CMD --version"
659-
exit 1
660-
fi
607+
LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} --version`
661608
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV"
662609
putvar CFG_LOCAL_RUST_ROOT
663-
else
664-
if [ ! -z "$CFG_LOCAL_RUST_ROOT" ]
665-
then
666-
warn "Use of --local-rust-root without --enable-local-rust"
667-
fi
668610
fi
669611

670612
# Force freebsd to build with clang; gcc doesn't like us there
671613
if [ $CFG_OSTYPE = unknown-freebsd ]
672614
then
673615
step_msg "on FreeBSD, forcing use of clang"
674616
CFG_ENABLE_CLANG=1
617+
putvar CFG_ENABLE_CLANG
675618
fi
676619

677620
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
@@ -688,10 +631,12 @@ then
688631
then
689632
step_msg "on OS X 10.9, forcing use of clang"
690633
CFG_ENABLE_CLANG=1
634+
putvar CFG_ENABLE_CLANG
691635
else
692636
if [ $("$CFG_GCC" --version 2>&1 | grep -c ' 4\.[0-6]') -ne 0 ]; then
693637
step_msg "older GCC found, using clang instead"
694638
CFG_ENABLE_CLANG=1
639+
putvar CFG_ENABLE_CLANG
695640
else
696641
# on OS X, with xcode 5 and newer, certain developers may have
697642
# cc, gcc and g++ point to a mixture of clang and gcc
@@ -717,13 +662,6 @@ then
717662
fi
718663
fi
719664

720-
# Okay, at this point, we have made up our minds about whether we are
721-
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
722-
if [ ! -z "$CFG_ENABLE_CLANG" ]
723-
then
724-
putvar CFG_ENABLE_CLANG
725-
fi
726-
727665
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
728666
then
729667
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
@@ -968,7 +906,6 @@ do
968906
done
969907

970908
make_dir $h/test/run-pass
971-
make_dir $h/test/run-pass-valgrind
972909
make_dir $h/test/run-pass-fulldeps
973910
make_dir $h/test/run-fail
974911
make_dir $h/test/compile-fail
@@ -1264,11 +1201,18 @@ putvar CFG_OSTYPE
12641201
putvar CFG_CPUTYPE
12651202
putvar CFG_CONFIGURE_ARGS
12661203
putvar CFG_PREFIX
1204+
putvar CFG_BUILD
12671205
putvar CFG_HOST
12681206
putvar CFG_TARGET
1207+
putvar CFG_LIBDIR
12691208
putvar CFG_LIBDIR_RELATIVE
12701209
putvar CFG_DISABLE_MANAGE_SUBMODULES
1210+
putvar CFG_ANDROID_CROSS_PATH
1211+
putvar CFG_MINGW32_CROSS_PATH
12711212
putvar CFG_MANDIR
1213+
putvar CFG_DISABLE_INJECT_STD_VERSION
1214+
putvar CFG_JEMALLOC_ROOT
1215+
putvar CFG_DISABLE_JEMALLOC
12721216

12731217
# Avoid spurious warnings from clang by feeding it original source on
12741218
# ccache-miss rather than preprocessed input.
@@ -1291,6 +1235,16 @@ then
12911235
putvar CFG_PANDOC
12921236
fi
12931237

1238+
# Valgrind is only reliable on Linux. On Windows it doesn't work at all, and
1239+
# on the Mac the dynamic linker causes Valgrind to emit a huge stream of
1240+
# errors.
1241+
if [ $CFG_OSTYPE != unknown-linux-gnu ] && [ $CFG_OSTYPE != apple-darwin ]
1242+
then
1243+
CFG_BAD_VALGRIND=1
1244+
putvar CFG_BAD_VALGRIND
1245+
fi
1246+
1247+
putvar CFG_LLVM_ROOT
12941248
putvar CFG_LLVM_SRC_DIR
12951249

12961250
for t in $CFG_HOST

branches/snap-stage3/mk/main.mk

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,6 @@ RUSTFLAGS_STAGE1 += -C prefer-dynamic
157157
# by not emitting them.
158158
RUSTFLAGS_STAGE0 += -Z no-landing-pads
159159

160-
# Go fast for stage0, and also for stage1/stage2 if optimization is off.
161-
RUSTFLAGS_STAGE0 += -C codegen-units=4
162-
ifdef CFG_DISABLE_OPTIMIZE
163-
RUSTFLAGS_STAGE1 += -C codegen-units=4
164-
RUSTFLAGS_STAGE2 += -C codegen-units=4
165-
endif
166-
167160
# platform-specific auto-configuration
168161
include $(CFG_SRC_DIR)mk/platform.mk
169162

@@ -174,20 +167,16 @@ else
174167
CFG_VALGRIND_COMPILE :=
175168
endif
176169

177-
178-
ifndef CFG_DISABLE_VALGRIND_RPASS
179-
$(info cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS))
180-
CFG_VALGRIND_RPASS :=$(CFG_VALGRIND)
181-
else
182-
CFG_VALGRIND_RPASS :=
183-
endif
184-
185-
186170
ifdef CFG_ENABLE_VALGRIND
187171
$(info cfg: enabling valgrind (CFG_ENABLE_VALGRIND))
188172
else
189173
CFG_VALGRIND :=
190174
endif
175+
ifdef CFG_BAD_VALGRIND
176+
$(info cfg: disabling valgrind due to its unreliability on this platform)
177+
CFG_VALGRIND :=
178+
endif
179+
191180

192181
######################################################################
193182
# Target-and-rule "utility variables"

branches/snap-stage3/mk/platform.mk

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,6 @@ ifdef CFG_VALGRIND
5858
endif
5959
endif
6060

61-
# If we actually want to run Valgrind on a given platform, set this variable
62-
define DEF_GOOD_VALGRIND
63-
ifeq ($(OSTYPE_$(1)),unknown-linux-gnu)
64-
GOOD_VALGRIND_$(1) = 1
65-
endif
66-
ifneq (,$(filter $(OSTYPE_$(1)),darwin freebsd))
67-
ifeq (HOST_$(1),x86_64)
68-
GOOD_VALGRIND_$(1) = 1
69-
endif
70-
endif
71-
endef
72-
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_GOOD_VALGRIND,$(t))))
73-
$(foreach t,$(CFG_TARGET),$(info cfg: good valgrind for $(t) is $(GOOD_VALGRIND_$(t))))
74-
7561
ifneq ($(findstring linux,$(CFG_OSTYPE)),)
7662
ifdef CFG_PERF
7763
ifneq ($(CFG_PERF_WITH_LOGFD),)

0 commit comments

Comments
 (0)