Skip to content

Commit d5e6c0a

Browse files
committed
---
yaml --- r: 209581 b: refs/heads/try c: efa6a46 h: refs/heads/master i: 209579: 302b8a5 v: v3
1 parent 5853796 commit d5e6c0a

File tree

1,618 files changed

+19815
-42645
lines changed

Some content is hidden

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

1,618 files changed

+19815
-42645
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: 986852911464df87088007e64780165cc538f9b9
5+
refs/heads/try: efa6a46a8eceb4ab792d5ec8e28cf3baaaa96491
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ Tamir Duberstein <[email protected]>
796796
Taras Shpot <[email protected]>
797797
Taylor Hutchison <[email protected]>
798798
Ted Horst <[email protected]>
799-
Tero Hänninen <[email protected]>
799+
Tero Hänninen <[email protected]>
800800
Thad Guidry <[email protected]>
801801
Thiago Carvalho <[email protected]>
802802
Thiago Pontes <[email protected]>

branches/try/Makefile.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@
159159
#
160160
# Admittedly this is a little convoluted.
161161
#
162+
# If you find yourself working on the make infrastructure itself, and trying to
163+
# find the value of a given variable after expansion, you can use:
164+
#
165+
# make print-VARIABLE_NAME
166+
#
167+
# To extract it
168+
#
162169
# </nitty-gritty>
163170
#
164171

branches/try/configure

Lines changed: 60 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,15 @@ valopt_core() {
192192
then
193193
local UOP=$(echo $OP | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
194194
local V="CFG_${UOP}"
195+
local V_PROVIDED="${V}_PROVIDED"
195196
eval $V="$DEFAULT"
196197
for arg in $CFG_CONFIGURE_ARGS
197198
do
198199
if echo "$arg" | grep -q -- "--$OP="
199200
then
200201
val=$(echo "$arg" | cut -f2 -d=)
201202
eval $V=$val
203+
eval $V_PROVIDED=1
202204
fi
203205
done
204206
if [ "$SAVE" = "save" ]
@@ -247,8 +249,10 @@ opt_core() {
247249
if [ $DEFAULT -eq 0 ]
248250
then
249251
FLAG="enable"
252+
DEFAULT_FLAG="disable"
250253
else
251254
FLAG="disable"
255+
DEFAULT_FLAG="enable"
252256
DOC="don't $DOC"
253257
fi
254258

@@ -261,11 +265,19 @@ opt_core() {
261265
OP=$(echo $OP | tr 'a-z-' 'A-Z_')
262266
FLAG=$(echo $FLAG | tr 'a-z' 'A-Z')
263267
local V="CFG_${FLAG}_${OP}"
268+
local V_PROVIDED="CFG_${FLAG}_${OP}_PROVIDED"
264269
eval $V=1
270+
eval $V_PROVIDED=1
265271
if [ "$SAVE" = "save" ]
266272
then
267273
putvar $V
268274
fi
275+
elif [ "$arg" = "--${DEFAULT_FLAG}-${OP}" ]
276+
then
277+
OP=$(echo $OP | tr 'a-z-' 'A-Z_')
278+
DEFAULT_FLAG=$(echo $DEFAULT_FLAG | tr 'a-z' 'A-Z')
279+
local V_PROVIDED="CFG_${DEFAULT_FLAG}_${OP}_PROVIDED"
280+
eval $V_PROVIDED=1
269281
fi
270282
done
271283
else
@@ -523,30 +535,35 @@ fi
523535
BOOL_OPTIONS=""
524536
VAL_OPTIONS=""
525537

538+
opt debug 0 "debug mode"
526539
opt valgrind 0 "run tests with valgrind (memcheck by default)"
527540
opt helgrind 0 "run tests with helgrind instead of memcheck"
528541
opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"
529542
opt docs 1 "build standard library documentation"
530543
opt compiler-docs 0 "build compiler documentation"
531-
opt optimize 1 "build optimized rust code"
532-
opt optimize-cxx 1 "build optimized C++ code"
533-
opt optimize-llvm 1 "build optimized LLVM"
534544
opt optimize-tests 1 "build tests with optimizations"
535545
opt libcpp 1 "build with llvm with libc++ instead of libstdc++ when using clang"
536-
opt llvm-assertions 1 "build LLVM with assertions"
537-
opt debug 1 "build with extra debug fun"
546+
opt llvm-assertions 0 "build LLVM with assertions"
547+
opt debug-assertions 0 "build with debugging assertions"
538548
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
539549
opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
540550
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
541551
opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
542552
opt rpath 0 "build rpaths into rustc itself"
543-
opt nightly 0 "build nightly packages"
544-
opt verify-install 1 "verify installed binaries work"
545553
# This is used by the automation to produce single-target nightlies
546554
opt dist-host-only 0 "only install bins for the host architecture"
547555
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
548556
opt llvm-version-check 1 "don't check if the LLVM version is supported, build anyway"
549557

558+
# Optimization and debugging options. These may be overridden by the release channel, etc.
559+
opt_nosave optimize 1 "build optimized rust code"
560+
opt_nosave optimize-cxx 1 "build optimized C++ code"
561+
opt_nosave optimize-llvm 1 "build optimized LLVM"
562+
opt_nosave llvm-assertions 0 "build LLVM with assertions"
563+
opt_nosave debug-assertions 0 "build with debugging assertions"
564+
opt_nosave debuginfo 0 "build with debugger metadata"
565+
opt_nosave debug-jemalloc 0 "build jemalloc with --enable-debug --enable-fill"
566+
550567
valopt localstatedir "/var/lib" "local state directory"
551568
valopt sysconfdir "/etc" "install system configuration files"
552569

@@ -556,6 +573,7 @@ valopt llvm-root "" "set LLVM root"
556573
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
557574
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
558575
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
576+
valopt release-channel "dev" "the name of the release channel to build"
559577

560578
# Many of these are saved below during the "writing configuration" step
561579
# (others are conditionally saved).
@@ -568,7 +586,6 @@ valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
568586
valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
569587
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
570588
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
571-
valopt_nosave release-channel "dev" "the name of the release channel to build"
572589

573590
# Temporarily support old triples until buildbots get updated
574591
CFG_BUILD=$(to_llvm_triple $CFG_BUILD)
@@ -612,22 +629,40 @@ fi
612629
step_msg "validating $CFG_SELF args"
613630
validate_opt
614631

615-
# Validate the release channel
632+
# Validate the release channel, and configure options
616633
case "$CFG_RELEASE_CHANNEL" in
617-
(dev | nightly | beta | stable)
634+
nightly )
635+
msg "overriding settings for $CFG_RELEASE_CHANNEL"
636+
CFG_ENABLE_LLVM_ASSERTIONS=1
618637
;;
619-
(*)
638+
dev | beta | stable)
639+
;;
640+
*)
620641
err "release channel must be 'dev', 'nightly', 'beta' or 'stable'"
621642
;;
622643
esac
623644

624-
# Continue supporting the old --enable-nightly flag to transition the bots
625-
# XXX Remove me
626-
if [ ! -z "$CFG_ENABLE_NIGHTLY" ]
627-
then
628-
CFG_RELEASE_CHANNEL=nightly
645+
# Adjust perf and debug options for debug mode
646+
if [ -n "$CFG_ENABLE_DEBUG" ]; then
647+
msg "debug mode enabled, setting performance options"
648+
if [ -z "$CFG_ENABLE_OPTIMIZE_PROVIDED" ]; then
649+
msg "optimization not explicitly enabled, disabling optimization"
650+
CFG_DISABLE_OPTIMIZE=1
651+
CFG_DISABLE_OPTIMIZE_CXX=1
652+
fi
653+
CFG_ENABLE_LLVM_ASSERTIONS=1
654+
CFG_ENABLE_DEBUG_ASSERTIONS=1
655+
CFG_ENABLE_DEBUG_JEMALLOC=1
629656
fi
630-
putvar CFG_RELEASE_CHANNEL
657+
658+
# OK, now write the debugging options
659+
if [ -n "$CFG_DISABLE_OPTIMIZE" ]; then putvar CFG_DISABLE_OPTIMIZE; fi
660+
if [ -n "$CFG_DISABLE_OPTIMIZE_CXX" ]; then putvar CFG_DISABLE_OPTIMIZE_CXX; fi
661+
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then putvar CFG_DISABLE_OPTIMIZE_LLVM; fi
662+
if [ -n "$CFG_ENABLE_LLVM_ASSERTIONS" ]; then putvar CFG_ENABLE_LLVM_ASSERTIONS; fi
663+
if [ -n "$CFG_ENABLE_DEBUG_ASSERTIONS" ]; then putvar CFG_ENABLE_DEBUG_ASSERTIONS; fi
664+
if [ -n "$CFG_ENABLE_DEBUGINFO" ]; then putvar CFG_ENABLE_DEBUGINFO; fi
665+
if [ -n "$CFG_ENABLE_DEBUG_JEMALLOC" ]; then putvar CFG_ENABLE_DEBUG_JEMALLOC; fi
631666

632667
# A magic value that allows the compiler to use unstable features
633668
# during the bootstrap even when doing so would normally be an error
@@ -1108,6 +1143,7 @@ do
11081143
make_dir $h/test/debuginfo-gdb
11091144
make_dir $h/test/debuginfo-lldb
11101145
make_dir $h/test/codegen
1146+
make_dir $h/test/rustdoc
11111147
done
11121148

11131149
# Configure submodules
@@ -1180,7 +1216,7 @@ do
11801216
LLVM_DBG_OPTS="--enable-optimized"
11811217
LLVM_INST_DIR=$LLVM_BUILD_DIR/Release
11821218
fi
1183-
if [ ! -z "$CFG_DISABLE_LLVM_ASSERTIONS" ]
1219+
if [ -z "$CFG_ENABLE_LLVM_ASSERTIONS" ]
11841220
then
11851221
LLVM_ASSERTION_OPTS="--disable-assertions"
11861222
else
@@ -1434,6 +1470,11 @@ move_if_changed config.tmp config.mk
14341470
rm -f config.tmp
14351471
touch config.stamp
14361472

1437-
step_msg "complete"
1473+
if [ -z "$CFG_ENABLE_DEBUG" ]; then
1474+
step_msg "configured in release mode. for development consider --enable-debug"
1475+
else
1476+
step_msg "complete"
1477+
fi
1478+
14381479
msg "run \`make help\`"
14391480
msg

branches/try/mk/crates.mk

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -118,42 +118,13 @@ ONLY_RLIB_collections := 1
118118
ONLY_RLIB_unicode := 1
119119
ONLY_RLIB_rustc_bitflags := 1
120120

121+
# Documented-by-default crates
122+
DOC_CRATES := std alloc collections core libc unicode
123+
121124
################################################################################
122125
# You should not need to edit below this line
123126
################################################################################
124127

125-
# On channels where the only usable crate is std, only build documentation for
126-
# std. This keeps distributions small and doesn't clutter up the API docs with
127-
# confusing internal details from the crates behind the facade.
128-
#
129-
# (Disabled while cmr figures out how to change rustdoc to make reexports work
130-
# slightly nicer. Otherwise, all cross-crate links to Vec will go to
131-
# libcollections, breaking them, and [src] links for anything reexported will
132-
# not work.)
133-
134-
#ifeq ($(CFG_RELEASE_CHANNEL),stable)
135-
#DOC_CRATES := std
136-
#else
137-
#ifeq ($(CFG_RELEASE_CHANNEL),beta)
138-
#DOC_CRATES := std
139-
#else
140-
DOC_CRATES := $(filter-out rustc, \
141-
$(filter-out rustc_trans, \
142-
$(filter-out rustc_typeck, \
143-
$(filter-out rustc_borrowck, \
144-
$(filter-out rustc_resolve, \
145-
$(filter-out rustc_driver, \
146-
$(filter-out rustc_privacy, \
147-
$(filter-out rustc_lint, \
148-
$(filter-out log, \
149-
$(filter-out getopts, \
150-
$(filter-out syntax, $(CRATES))))))))))))
151-
#endif
152-
#endif
153-
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
154-
rustc_typeck rustc_driver syntax rustc_privacy \
155-
rustc_lint
156-
157128
# This macro creates some simple definitions for each crate being built, just
158129
# some munging of all of the parameters above.
159130
#

branches/try/mk/docs.mk

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,18 +250,20 @@ endif
250250
doc/$(1)/:
251251
$$(Q)mkdir -p $$@
252252

253-
$(2) += doc/$(1)/index.html
254253
doc/$(1)/index.html: CFG_COMPILER_HOST_TRIPLE = $(CFG_TARGET)
255254
doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1)) doc/$(1)/
256255
@$$(call E, rustdoc: $$@)
257256
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(CFG_BUILD)) \
258-
$$(RUSTDOC) --cfg dox --cfg stage2 $$<
257+
$$(RUSTDOC) --cfg dox --cfg stage2 $$(RUSTFLAGS_$(1)) $$<
259258
endef
260259

261-
$(foreach crate,$(DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),DOC_TARGETS)))
260+
$(foreach crate,$(CRATES),$(eval $(call DEF_LIB_DOC,$(crate))))
262261

262+
COMPILER_DOC_TARGETS := $(CRATES:%=doc/%/index.html)
263263
ifdef CFG_COMPILER_DOCS
264-
$(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_DOC_TARGETS)))
264+
DOC_TARGETS += $(COMPILER_DOC_TARGETS)
265+
else
266+
DOC_TARGETS += $(DOC_CRATES:%=doc/%/index.html)
265267
endif
266268

267269
ifdef CFG_DISABLE_DOCS

branches/try/mk/install.mk

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
# option. This file may not be copied, modified, or distributed
99
# except according to those terms.
1010

11-
ifdef CFG_DISABLE_VERIFY_INSTALL
12-
MAYBE_DISABLE_VERIFY=--disable-verify
13-
else
14-
MAYBE_DISABLE_VERIFY=
15-
endif
16-
1711
install:
1812
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
1913
# Build the dist as the original user
@@ -22,9 +16,9 @@ else
2216
$(Q)$(MAKE) prepare_install
2317
endif
2418
ifeq ($(CFG_DISABLE_DOCS),)
25-
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(DOC_PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
19+
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(DOC_PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
2620
endif
27-
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
21+
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
2822
# Remove tmp files because it's a decent amount of disk space
2923
$(Q)rm -R tmp/dist
3024

branches/try/mk/main.mk

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.0.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=
21+
CFG_PRERELEASE_VERSION=.2
2222

2323
CFG_FILENAME_EXTRA=4e7c5e5c
2424

@@ -126,11 +126,16 @@ endif
126126

127127
CFG_JEMALLOC_FLAGS += $(JEMALLOC_FLAGS)
128128

129-
ifdef CFG_DISABLE_DEBUG
130-
CFG_RUSTC_FLAGS += --cfg ndebug
131-
else
132-
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
129+
ifdef CFG_ENABLE_DEBUG_ASSERTIONS
130+
$(info cfg: enabling debug assertions (CFG_ENABLE_DEBUG_ASSERTIONS))
133131
CFG_RUSTC_FLAGS += --cfg debug -C debug-assertions=on
132+
else
133+
CFG_RUSTC_FLAGS += --cfg ndebug
134+
endif
135+
136+
ifdef CFG_ENABLE_DEBUGINFO
137+
$(info cfg: enabling debuginfo (CFG_ENABLE_DEBUGINFO))
138+
CFG_RUSTC_FLAGS += -g
134139
endif
135140

136141
ifdef SAVE_TEMPS

branches/try/mk/rt.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ else ifeq ($(findstring android, $(OSTYPE_$(1))), android)
143143
JEMALLOC_ARGS_$(1) := --disable-tls
144144
endif
145145

146+
ifdef CFG_ENABLE_DEBUG_JEMALLOC
147+
JEMALLOC_ARGS_$(1) += --enable-debug --enable-fill
148+
endif
149+
146150
################################################################################
147151
# jemalloc
148152
################################################################################

0 commit comments

Comments
 (0)