Skip to content

Commit 9f37eef

Browse files
committed
---
yaml --- r: 212218 b: refs/heads/tmp c: 2bcb079 h: refs/heads/master v: v3
1 parent 17d6b19 commit 9f37eef

Some content is hidden

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

81 files changed

+1869
-1084
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3232
refs/heads/beta: 62e70d35be3fe532c26a400b499c58a18f18dd3a
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: c4f42a1ab4cf047921018d6ecabbb00ea47fc683
35+
refs/heads/tmp: 2bcb07933f0ab2276859335436b136a790adf8cd
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: b77d60adb019bb5de05e884a99f3290ec4694137
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Hajime Morrita <[email protected]>
338338
Hanno Braun <[email protected]>
339339
Harry Marr <[email protected]>
340340
341-
Heejong Ahn <[email protected]
341+
Heejong Ahn <[email protected]>
342342
Henrik Schopmans <[email protected]>
343343
Herman J. Radtke III <[email protected]>
344344
HeroesGrave <[email protected]>

branches/tmp/configure

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ 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"
585586
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
586587
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
587588
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
@@ -593,6 +594,7 @@ valopt musl-root "/usr/local" "MUSL root installation directory"
593594
opt_nosave manage-submodules 1 "let the build manage the git submodules"
594595
opt_nosave clang 0 "prefer clang to gcc for building the runtime"
595596
opt_nosave jemalloc 1 "build liballoc with jemalloc"
597+
opt elf-tls 1 "elf thread local storage on platforms where supported"
596598

597599
valopt_nosave prefix "/usr/local" "set installation prefix"
598600
valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
@@ -694,7 +696,9 @@ putvar CFG_BOOTSTRAP_KEY
694696
step_msg "looking for build programs"
695697

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

699703
python_version=$($CFG_PYTHON -V 2>&1)
700704
if [ $(echo $python_version | grep -c '^Python 2\.[4567]') -ne 1 ]; then
@@ -848,13 +852,6 @@ then
848852
putvar CFG_LOCAL_RUST_ROOT
849853
fi
850854

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-
858855
# Force bitrig to build with clang; gcc doesn't like us there
859856
if [ $CFG_OSTYPE = unknown-bitrig ]
860857
then
@@ -972,8 +969,8 @@ fi
972969

973970
if [ ! -z "$CFG_ENABLE_CLANG" ]
974971
then
975-
if [ -z "$CC" ] || [[ $CC == *clang ]]
976-
then
972+
case "$CC" in
973+
(''|*clang)
977974
CFG_CLANG_VERSION=$($CFG_CC \
978975
--version \
979976
| grep version \
@@ -993,9 +990,11 @@ then
993990
err "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn"
994991
;;
995992
esac
996-
else
993+
;;
994+
(*)
997995
msg "skipping CFG_ENABLE_CLANG version check; provided CC=$CC"
998-
fi
996+
;;
997+
esac
999998
fi
1000999

10011000
if [ ! -z "$CFG_ENABLE_CCACHE" ]
@@ -1308,6 +1307,12 @@ CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/
13081307
for t in $CFG_HOST
13091308
do
13101309
do_reconfigure=1
1310+
is_msvc=0
1311+
case "$t" in
1312+
(*-msvc)
1313+
is_msvc=1
1314+
;;
1315+
esac
13111316

13121317
if [ -z $CFG_LLVM_ROOT ]
13131318
then
@@ -1327,7 +1332,13 @@ do
13271332
LLVM_ASSERTION_OPTS="--disable-assertions"
13281333
else
13291334
LLVM_ASSERTION_OPTS="--enable-assertions"
1330-
LLVM_INST_DIR=${LLVM_INST_DIR}+Asserts
1335+
1336+
# Apparently even if we request assertions be enabled for MSVC,
1337+
# LLVM's CMake build system ignore this and outputs in `Release`
1338+
# anyway.
1339+
if [ ${is_msvc} -eq 0 ]; then
1340+
LLVM_INST_DIR=${LLVM_INST_DIR}+Asserts
1341+
fi
13311342
fi
13321343
else
13331344
msg "not reconfiguring LLVM, external LLVM root"
@@ -1357,14 +1368,7 @@ do
13571368
done
13581369
fi
13591370

1360-
use_cmake=0
1361-
case "$t" in
1362-
(*-msvc)
1363-
use_cmake=1
1364-
;;
1365-
esac
1366-
1367-
if [ ${do_reconfigure} -ne 0 ] && [ ${use_cmake} -ne 0 ]
1371+
if [ ${do_reconfigure} -ne 0 ] && [ ${is_msvc} -ne 0 ]
13681372
then
13691373
msg "configuring LLVM for $t with cmake"
13701374

@@ -1389,7 +1393,7 @@ do
13891393
need_ok "LLVM cmake configure failed"
13901394
fi
13911395

1392-
if [ ${do_reconfigure} -ne 0 ] && [ ${use_cmake} -eq 0 ]
1396+
if [ ${do_reconfigure} -ne 0 ] && [ ${is_msvc} -eq 0 ]
13931397
then
13941398
# LLVM's configure doesn't recognize the new Windows triples yet
13951399
gnu_t=$(to_gnu_triple $t)

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,8 @@ 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/tmp/mk/crates.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,7 @@ 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/tmp/mk/debuggers.mk

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

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

2829

2930
## LLDB ##
30-
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB=lldb_rust_formatters.py
31+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB=lldb_rust_formatters.py \
32+
debugger_pretty_printers_common.py
3133
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS=\
3234
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB), \
3335
$(CFG_SRC_DIR)src/etc/$(script))

branches/tmp/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_COMPILER_DOCS
268+
ifdef CFG_ENABLE_COMPILER_DOCS
269269
DOC_TARGETS += $(COMPILER_DOC_TARGETS)
270270
else
271271
DOC_TARGETS += $(DOC_CRATES:%=doc/%/index.html)

branches/tmp/mk/main.mk

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ 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-
8077
# Windows exe's need numeric versions - don't use anything but
8178
# numbers and dots here
8279
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
@@ -130,9 +127,7 @@ CFG_JEMALLOC_FLAGS += $(JEMALLOC_FLAGS)
130127

131128
ifdef CFG_ENABLE_DEBUG_ASSERTIONS
132129
$(info cfg: enabling debug assertions (CFG_ENABLE_DEBUG_ASSERTIONS))
133-
CFG_RUSTC_FLAGS += --cfg debug -C debug-assertions=on
134-
else
135-
CFG_RUSTC_FLAGS += --cfg ndebug
130+
CFG_RUSTC_FLAGS += -C debug-assertions=on
136131
endif
137132

138133
ifdef CFG_ENABLE_DEBUGINFO
@@ -334,7 +329,6 @@ endif
334329
ifdef CFG_VER_HASH
335330
export CFG_VER_HASH
336331
endif
337-
export CFG_BUILD_DATE
338332
export CFG_VERSION
339333
export CFG_VERSION_WIN
340334
export CFG_RELEASE

branches/tmp/mk/target.mk

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,42 @@ $(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/tmp/mk/tests.mk

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,23 +172,24 @@ 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: cleantmptestlogs cleantestlibs all check-stage2
175+
check-notidy: check-sanitycheck 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: cleantestlibs cleantmptestlogs \
179+
check-lite: check-sanitycheck 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: cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \
187-
check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-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
188189
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
189190

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

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

branches/tmp/src/compiletest/runtest.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use std::fmt;
2424
use std::fs::{self, File};
2525
use std::io::BufReader;
2626
use std::io::prelude::*;
27-
use std::iter::repeat;
2827
use std::net::TcpStream;
2928
use std::path::{Path, PathBuf};
3029
use std::process::{Command, Output, ExitStatus};
@@ -928,12 +927,12 @@ fn check_forbid_output(props: &TestProps,
928927
}
929928
}
930929

931-
fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
930+
fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
932931
testfile: &Path,
933932
proc_res: &ProcRes) {
934933

935934
// true if we found the error in question
936-
let mut found_flags: Vec<_> = repeat(false).take(expected_errors.len()).collect();
935+
let mut found_flags = vec![false; expected_errors.len()];
937936

938937
if proc_res.status.success() {
939938
fatal("process did not return an error status");
@@ -954,14 +953,10 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
954953
}
955954
}
956955

957-
// A multi-line error will have followup lines which will always
958-
// start with one of these strings.
956+
// A multi-line error will have followup lines which start with a space
957+
// or open paren.
959958
fn continuation( line: &str) -> bool {
960-
line.starts_with(" expected") ||
961-
line.starts_with(" found") ||
962-
// 1234
963-
// Should have 4 spaces: see issue 18946
964-
line.starts_with("(")
959+
line.starts_with(" ") || line.starts_with("(")
965960
}
966961

967962
// Scan and extract our error/warning messages,

branches/tmp/src/doc/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,14 @@ 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+

0 commit comments

Comments
 (0)