Skip to content

Commit 2b726dd

Browse files
committed
---
yaml --- r: 211874 b: refs/heads/auto c: 528ab1f h: refs/heads/master v: v3
1 parent 44ef332 commit 2b726dd

Some content is hidden

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

50 files changed

+787
-1122
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: b70f49b86fa4d8780f46e869880e84e1c24c2f19
13+
refs/heads/auto: 528ab1fe9b51228daf41c7110216c33a93cfa341
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ valopt sysconfdir "/etc" "install system configuration files"
582582
valopt datadir "${CFG_PREFIX}/share" "install data"
583583
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
584584
valopt llvm-root "" "set LLVM root"
585-
valopt python "" "set path to python"
586585
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
587586
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
588587
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
@@ -594,7 +593,6 @@ valopt musl-root "/usr/local" "MUSL root installation directory"
594593
opt_nosave manage-submodules 1 "let the build manage the git submodules"
595594
opt_nosave clang 0 "prefer clang to gcc for building the runtime"
596595
opt_nosave jemalloc 1 "build liballoc with jemalloc"
597-
opt elf-tls 1 "elf thread local storage on platforms where supported"
598596

599597
valopt_nosave prefix "/usr/local" "set installation prefix"
600598
valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
@@ -696,9 +694,7 @@ putvar CFG_BOOTSTRAP_KEY
696694
step_msg "looking for build programs"
697695

698696
probe_need CFG_CURLORWGET curl wget
699-
if [ -z "$CFG_PYTHON_PROVIDED" ]; then
700-
probe_need CFG_PYTHON python2.7 python2.6 python2 python
701-
fi
697+
probe_need CFG_PYTHON python2.7 python2.6 python2 python
702698

703699
python_version=$($CFG_PYTHON -V 2>&1)
704700
if [ $(echo $python_version | grep -c '^Python 2\.[4567]') -ne 1 ]; then
@@ -852,6 +848,13 @@ then
852848
putvar CFG_LOCAL_RUST_ROOT
853849
fi
854850

851+
# Force freebsd to build with clang; gcc doesn't like us there
852+
if [ $CFG_OSTYPE = unknown-freebsd ]
853+
then
854+
step_msg "on FreeBSD, forcing use of clang"
855+
CFG_ENABLE_CLANG=1
856+
fi
857+
855858
# Force bitrig to build with clang; gcc doesn't like us there
856859
if [ $CFG_OSTYPE = unknown-bitrig ]
857860
then
@@ -969,8 +972,8 @@ fi
969972

970973
if [ ! -z "$CFG_ENABLE_CLANG" ]
971974
then
972-
case "$CC" in
973-
(''|*clang)
975+
if [ -z "$CC" ] || [[ $CC == *clang ]]
976+
then
974977
CFG_CLANG_VERSION=$($CFG_CC \
975978
--version \
976979
| grep version \
@@ -990,11 +993,9 @@ then
990993
err "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn"
991994
;;
992995
esac
993-
;;
994-
(*)
996+
else
995997
msg "skipping CFG_ENABLE_CLANG version check; provided CC=$CC"
996-
;;
997-
esac
998+
fi
998999
fi
9991000

10001001
if [ ! -z "$CFG_ENABLE_CCACHE" ]

branches/auto/mk/cfg/x86_64-pc-windows-msvc.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,3 @@ CUSTOM_DEPS_rustc_llvm_T_x86_64-pc-windows-msvc += \
8080
x86_64-pc-windows-msvc/rt/rustc_llvm.def: $(S)src/etc/mklldef.py \
8181
$(S)src/librustc_llvm/lib.rs
8282
$(CFG_PYTHON) $^ $@ rustc_llvm-$(CFG_FILENAME_EXTRA)
83-
84-
# All windows nightiles are currently a GNU triple, so this MSVC triple is not
85-
# bootstrapping from itself. This is relevant during stage0, and other parts of
86-
# the build system take this into account.
87-
BOOTSTRAP_FROM_x86_64-pc-windows-msvc := x86_64-pc-windows-gnu

branches/auto/mk/crates.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,3 @@ TOOL_INPUTS_$(1) := $$(call rwildcard,$$(dir $$(TOOL_SOURCE_$(1))),*.rs)
150150
endef
151151

152152
$(foreach crate,$(TOOLS),$(eval $(call RUST_TOOL,$(crate))))
153-
154-
ifdef CFG_DISABLE_ELF_TLS
155-
RUSTFLAGS_std := --cfg no_elf_tls
156-
endif

branches/auto/mk/debuggers.mk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515

1616
## GDB ##
1717
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB=gdb_load_rust_pretty_printers.py \
18-
gdb_rust_pretty_printing.py \
19-
debugger_pretty_printers_common.py
18+
gdb_rust_pretty_printing.py
2019
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS=\
2120
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB), \
2221
$(CFG_SRC_DIR)src/etc/$(script))
@@ -28,8 +27,7 @@ DEBUGGER_BIN_SCRIPTS_GDB_ABS=\
2827

2928

3029
## LLDB ##
31-
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB=lldb_rust_formatters.py \
32-
debugger_pretty_printers_common.py
30+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB=lldb_rust_formatters.py
3331
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS=\
3432
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB), \
3533
$(CFG_SRC_DIR)src/etc/$(script))

branches/auto/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ endef
265265
$(foreach crate,$(CRATES),$(eval $(call DEF_LIB_DOC,$(crate))))
266266

267267
COMPILER_DOC_TARGETS := $(CRATES:%=doc/%/index.html)
268-
ifdef CFG_ENABLE_COMPILER_DOCS
268+
ifdef CFG_COMPILER_DOCS
269269
DOC_TARGETS += $(COMPILER_DOC_TARGETS)
270270
else
271271
DOC_TARGETS += $(DOC_CRATES:%=doc/%/index.html)

branches/auto/mk/main.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
7474
endif
7575
endif
7676

77+
CFG_BUILD_DATE = $(shell date +%F)
78+
CFG_VERSION += (built $(CFG_BUILD_DATE))
79+
7780
# Windows exe's need numeric versions - don't use anything but
7881
# numbers and dots here
7982
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
@@ -127,7 +130,9 @@ CFG_JEMALLOC_FLAGS += $(JEMALLOC_FLAGS)
127130

128131
ifdef CFG_ENABLE_DEBUG_ASSERTIONS
129132
$(info cfg: enabling debug assertions (CFG_ENABLE_DEBUG_ASSERTIONS))
130-
CFG_RUSTC_FLAGS += -C debug-assertions=on
133+
CFG_RUSTC_FLAGS += --cfg debug -C debug-assertions=on
134+
else
135+
CFG_RUSTC_FLAGS += --cfg ndebug
131136
endif
132137

133138
ifdef CFG_ENABLE_DEBUGINFO
@@ -329,6 +334,7 @@ endif
329334
ifdef CFG_VER_HASH
330335
export CFG_VER_HASH
331336
endif
337+
export CFG_BUILD_DATE
332338
export CFG_VERSION
333339
export CFG_VERSION_WIN
334340
export CFG_RELEASE

branches/auto/mk/target.mk

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -181,42 +181,3 @@ $(foreach host,$(CFG_HOST), \
181181
$(foreach stage,$(STAGES), \
182182
$(foreach tool,$(TOOLS), \
183183
$(eval $(call TARGET_TOOL,$(stage),$(target),$(host),$(tool)))))))
184-
185-
# We have some triples which are bootstrapped from other triples, and this means
186-
# that we need to fixup some of the native tools that a triple depends on.
187-
#
188-
# For example, MSVC requires the llvm-ar.exe executable to manage archives, but
189-
# it bootstraps from the GNU Windows triple. This means that the compiler will
190-
# add this directory to PATH when executing new processes:
191-
#
192-
# $SYSROOT/rustlib/x86_64-pc-windows-gnu/bin
193-
#
194-
# Unfortunately, however, the GNU triple is not known about in stage0, so the
195-
# tools are actually located in:
196-
#
197-
# $SYSROOT/rustlib/x86_64-pc-windows-msvc/bin
198-
#
199-
# To remedy this problem, the rules below copy all native tool dependencies into
200-
# the bootstrap triple's location in stage 0 so the bootstrap compiler can find
201-
# the right sets of tools. Later stages (1+) will have the right host triple for
202-
# the compiler, so there's no need to worry there.
203-
#
204-
# $(1) - stage
205-
# $(2) - triple that's being used as host/target
206-
# $(3) - triple snapshot is built for
207-
# $(4) - crate
208-
# $(5) - tool
209-
define MOVE_TOOLS_TO_SNAPSHOT_HOST_DIR
210-
ifneq (,$(3))
211-
$$(TLIB$(1)_T_$(2)_H_$(2))/stamp.$(4): $$(HLIB$(1)_H_$(2))/rustlib/$(3)/bin/$(5)
212-
213-
$$(HLIB$(1)_H_$(2))/rustlib/$(3)/bin/$(5): $$(TBIN$(1)_T_$(2)_H_$(2))/$(5)
214-
mkdir -p $$(@D)
215-
cp $$< $$@
216-
endif
217-
endef
218-
219-
$(foreach target,$(CFG_TARGET), \
220-
$(foreach crate,$(CRATES), \
221-
$(foreach tool,$(NATIVE_TOOL_DEPS_$(crate)_T_$(target)), \
222-
$(eval $(call MOVE_TOOLS_TO_SNAPSHOT_HOST_DIR,0,$(target),$(BOOTSTRAP_FROM_$(target)),$(crate),$(tool))))))

branches/auto/mk/tests.mk

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,24 +172,23 @@ check: check-sanitycheck cleantmptestlogs cleantestlibs all check-stage2 tidy
172172
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
173173

174174
# As above but don't bother running tidy.
175-
check-notidy: check-sanitycheck cleantmptestlogs cleantestlibs all check-stage2
175+
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
176176
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
177177

178178
# A slightly smaller set of tests for smoke testing.
179-
check-lite: check-sanitycheck cleantestlibs cleantmptestlogs \
179+
check-lite: cleantestlibs cleantmptestlogs \
180180
$(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \
181181
check-stage2-rpass check-stage2-rpass-valgrind \
182182
check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
183183
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
184184

185185
# Only check the 'reference' tests: rpass/cfail/rfail/rmake.
186-
check-ref: check-sanitycheck cleantestlibs cleantmptestlogs check-stage2-rpass \
187-
check-stage2-rpass-valgrind check-stage2-rfail check-stage2-cfail check-stage2-pfail \
188-
check-stage2-rmake
186+
check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \
187+
check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
189188
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
190189

191190
# Only check the docs.
192-
check-docs: check-sanitycheck cleantestlibs cleantmptestlogs check-stage2-docs
191+
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
193192
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
194193

195194
# Some less critical tests that are not prone to breakage.

branches/auto/src/doc/index.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,3 @@ something if you know its name.
8686

8787
If you encounter an error while compiling your code you may be able to look it
8888
up in the [Rust Compiler Error Index](error-index.html).
89-
90-
# Community Translations
91-
92-
Several projects have been started to translate the documentation into other
93-
languages:
94-
95-
- [Russian](https://github.com/kgv/rust_book_ru)
96-
- [Korean](https://github.com/rust-kr/doc.rust-kr.org)
97-
- [Chinese](https://github.com/KaiserY/rust-book-chinese)
98-
- [Spanish](https://github.com/goyox86/elpr)
99-

branches/auto/src/doc/reference.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,6 +1943,9 @@ macro scope.
19431943
- `simd` - on certain tuple structs, derive the arithmetic operators, which
19441944
lower to the target's SIMD instructions, if any; the `simd` feature gate
19451945
is necessary to use this attribute.
1946+
- `static_assert` - on statics whose type is `bool`, terminates compilation
1947+
with an error if it is not initialized to `true`. To use this, the `static_assert`
1948+
feature gate must be enabled.
19461949
- `unsafe_no_drop_flag` - on structs, remove the flag that prevents
19471950
destructors from being run twice. Destructors might be run multiple times on
19481951
the same object with this attribute. To use this, the `unsafe_no_drop_flag` feature
@@ -2298,6 +2301,12 @@ The currently implemented features of the reference compiler are:
22982301
crate. Stability markers are also attributes: `#[stable]`,
22992302
`#[unstable]`, and `#[deprecated]` are the three levels.
23002303

2304+
* `static_assert` - The `#[static_assert]` functionality is experimental and
2305+
unstable. The attribute can be attached to a `static` of
2306+
type `bool` and the compiler will error if the `bool` is
2307+
`false` at compile time. This version of this functionality
2308+
is unintuitive and suboptimal.
2309+
23012310
* `start` - Allows use of the `#[start]` attribute, which changes the entry point
23022311
into a Rust program. This capability, especially the signature for the
23032312
annotated function, is subject to change.

branches/auto/src/doc/trpl/iterators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ You can chain all three things together: start with an iterator, adapt it
321321
a few times, and then consume the result. Check it out:
322322

323323
```rust
324-
(1..)
324+
(1..1000)
325325
.filter(|&x| x % 2 == 0)
326326
.filter(|&x| x % 3 == 0)
327327
.take(5)

branches/auto/src/doc/trpl/mutability.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ b.x = 10; // error: cannot assign to immutable field `b.x`
159159

160160
[struct]: structs.html
161161

162-
However, by using [`Cell<T>`][cell], you can emulate field-level mutability:
162+
However, by using `Cell<T>`, you can emulate field-level mutability:
163163

164164
```rust
165165
use std::cell::Cell;
@@ -176,6 +176,4 @@ point.y.set(7);
176176
println!("y: {:?}", point.y);
177177
```
178178

179-
[cell]: ../std/cell/struct.Cell.html
180-
181179
This will print `y: Cell { value: 7 }`. We’ve successfully updated `y`.

branches/auto/src/doc/trpl/raw-pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ For more operations on raw pointers, see [their API documentation][rawapi].
7777
# FFI
7878

7979
Raw pointers are useful for FFI: Rust’s `*const T` and `*mut T` are similar to
80-
C’s `const T*` and `T*`, respectively. For more about this use, consult the
80+
C’s `const T*` and `T*`, respectfully. For more about this use, consult the
8181
[FFI chapter][ffi].
8282

8383
[ffi]: ffi.html

branches/auto/src/etc/check-sanitycheck.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@
1111
# except according to those terms.
1212

1313
import os
14-
import subprocess
1514
import sys
1615
import functools
1716

1817
STATUS = 0
1918

19+
2020
def error_unless_permitted(env_var, message):
2121
global STATUS
2222
if not os.getenv(env_var):
2323
sys.stderr.write(message)
2424
STATUS = 1
2525

26+
2627
def only_on(platforms):
2728
def decorator(func):
2829
@functools.wraps(func)
@@ -32,7 +33,8 @@ def inner():
3233
return inner
3334
return decorator
3435

35-
@only_on(['linux', 'darwin', 'freebsd', 'openbsd'])
36+
37+
@only_on(('linux', 'darwin', 'freebsd', 'openbsd'))
3638
def check_rlimit_core():
3739
import resource
3840
soft, hard = resource.getrlimit(resource.RLIMIT_CORE)
@@ -43,14 +45,8 @@ def check_rlimit_core():
4345
set ALLOW_NONZERO_RLIMIT_CORE to ignore this warning
4446
""" % (soft))
4547

46-
@only_on(['win32'])
47-
def check_console_code_page():
48-
if '65001' not in subprocess.check_output(['cmd', '/c', 'chcp']):
49-
sys.stderr.write('Warning: the console output code page is not UTF-8, \
50-
some tests may fail. Use `cmd /c "chcp 65001"` to setup UTF-8 code page.\n')
5148

5249
def main():
53-
check_console_code_page()
5450
check_rlimit_core()
5551

5652
if __name__ == '__main__':

0 commit comments

Comments
 (0)