Skip to content

Commit 81a388a

Browse files
committed
Merge pull request #1 from rust-lang/master
Update
2 parents e719db2 + 94b0aac commit 81a388a

File tree

457 files changed

+18088
-11186
lines changed

Some content is hidden

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

457 files changed

+18088
-11186
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ If you're just reporting a bug, please see:
44

55
http://doc.rust-lang.org/complement-bugreport.html
66

7+
## Submitting an issue
8+
9+
Please submit issues here for bug reports or implementation details. For feature
10+
requests, language changes, or major changes to the libraries, please submit an
11+
issue against the [RFCs repository](https://github.com/rust-lang/rfcs).
12+
713
## Pull request procedure
814

915
Pull requests should be targeted at Rust's `master` branch.

configure

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ case $CFG_OSTYPE in
306306
# instead, msys defines $MSYSTEM which is MINGW32 on i686 and
307307
# MINGW64 on x86_64.
308308
CFG_CPUTYPE=i686
309-
CFG_OSTYPE=pc-mingw32
309+
CFG_OSTYPE=w64-mingw32
310310
if [ "$MSYSTEM" = MINGW64 ]
311311
then
312312
CFG_CPUTYPE=x86_64
@@ -453,6 +453,8 @@ valopt datadir "${CFG_PREFIX}/share" "install data"
453453
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
454454
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
455455

456+
valopt release-channel "source" "the name of the release channel to build"
457+
456458
# On windows we just store the libraries in the bin directory because
457459
# there's no rpath. This is where the build system itself puts libraries;
458460
# --libdir is used to configure the installation directory.
@@ -475,11 +477,22 @@ fi
475477
step_msg "validating $CFG_SELF args"
476478
validate_opt
477479

478-
# Temporarily support the old windows triples while the bots make the transition
480+
# Validate the release channel
481+
case "$CFG_RELEASE_CHANNEL" in
482+
(source | nightly | beta | stable)
483+
;;
484+
(*)
485+
err "release channel must be 'source', 'nightly', 'beta' or 'stable'"
486+
;;
487+
esac
488+
489+
# Continue supporting the old --enable-nightly flag to transition the bots
479490
# XXX Remove me
480-
CFG_BUILD=`echo "${CFG_BUILD}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
481-
CFG_HOST=`echo "${CFG_HOST}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
482-
CFG_TARGET=`echo "${CFG_TARGET}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
491+
if [ $CFG_ENABLE_NIGHTLY -eq 1 ]
492+
then
493+
CFG_RELEASE_CHANNEL=nightly
494+
putvar CFG_RELEASE_CHANNEL
495+
fi
483496

484497
step_msg "looking for build programs"
485498

@@ -636,7 +649,7 @@ then
636649
# check that gcc, cc and g++ all point to the same compiler.
637650
# note that for xcode 5, g++ points to clang, not clang++
638651
if !((chk_cc gcc clang && chk_cc g++ clang) ||
639-
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
652+
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))); then
640653
err "the gcc and g++ in your path point to different compilers.
641654
Check which versions are in your path with gcc --version and g++ --version.
642655
To resolve this problem, either fix your PATH or run configure with --enable-clang"

man/rustc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTC "1" "March 2014" "rustc 0.12.0-pre" "User Commands"
1+
.TH RUSTC "1" "March 2014" "rustc 0.12.0" "User Commands"
22
.SH NAME
33
rustc \- The Rust compiler
44
.SH SYNOPSIS

man/rustdoc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0-pre" "User Commands"
1+
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0" "User Commands"
22
.SH NAME
33
rustdoc \- generate documentation from Rust source code
44
.SH SYNOPSIS

mk/crates.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
6060

6161
DEPS_core :=
62+
DEPS_libc := core
6263
DEPS_rlibc := core
6364
DEPS_unicode := core
6465
DEPS_alloc := core libc native:jemalloc

mk/docs.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
2929
guide-tasks guide-container guide-pointers guide-testing \
3030
guide-runtime complement-bugreport \
3131
complement-lang-faq complement-design-faq complement-project-faq rust \
32-
rustdoc guide-unsafe guide-strings
32+
rustdoc guide-unsafe guide-strings reference
3333

34-
PDF_DOCS := guide rust
34+
PDF_DOCS := guide reference
3535

3636
RUSTDOC_DEPS_rust := doc/full-toc.inc
3737
RUSTDOC_FLAGS_rust := --html-in-header=doc/full-toc.inc

mk/main.mk

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,32 @@
1414

1515
# The version number
1616
CFG_RELEASE_NUM=0.12.0
17-
CFG_RELEASE_LABEL=-pre
1817

1918
CFG_FILENAME_EXTRA=4e7c5e5c
2019

21-
ifndef CFG_ENABLE_NIGHTLY
22-
# This is the normal version string
23-
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)
24-
CFG_PACKAGE_VERS=$(CFG_RELEASE)
25-
else
26-
# Modify the version label for nightly builds
27-
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)-nightly
28-
# When building nightly distributables just reuse the same "rust-nightly" name
29-
# so when we upload we'll always override the previous nighly. This doesn't actually
30-
# impact the version reported by rustc - it's just for file naming.
20+
ifeq ($(CFG_RELEASE_CHANNEL),stable)
21+
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
22+
CFG_RELEASE=$(CFG_RELEASE_NUM)
23+
# This is the string used in dist artifact file names, e.g. "0.12.0", "nightly"
24+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
25+
endif
26+
ifeq ($(CFG_RELEASE_CHANNEL),beta)
27+
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta
28+
# When building beta/nightly distributables just reuse the same "beta"
29+
# name so when we upload we'll always override the previous
30+
# nighly. This doesn't actually impact the version reported by rustc -
31+
# it's just for file naming.
32+
CFG_PACKAGE_VERS=beta
33+
endif
34+
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
35+
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
3136
CFG_PACKAGE_VERS=nightly
3237
endif
38+
ifeq ($(CFG_RELEASE_CHANNEL),source)
39+
CFG_RELEASE=$(CFG_RELEASE_NUM)-pre
40+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-pre
41+
endif
42+
3343
# The name of the package to use for creating tarballs, installers etc.
3444
CFG_PACKAGE_NAME=rust-$(CFG_PACKAGE_VERS)
3545

mk/rt.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ LIBUV_CFLAGS_$(1) := $(subst -Werror,,$(CFG_GCCISH_CFLAGS_$(1)))
203203

204204
$$(LIBUV_MAKEFILE_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
205205
(cd $(S)src/libuv/ && \
206+
CC="$$(CC_$(1))" \
207+
CXX="$$(CXX_$(1))" \
208+
AR="$$(AR_$(1))" \
206209
$$(CFG_PYTHON) ./gyp_uv.py -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) \
207210
-D ninja \
208211
-DOS=$$(LIBUV_OSTYPE_$(1)) \
@@ -225,6 +228,9 @@ else ifeq ($(OSTYPE_$(1)), apple-ios) # iOS
225228
$$(LIBUV_XCODEPROJ_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
226229
cp -rf $(S)src/libuv/ $$(LIBUV_BUILD_DIR_$(1))
227230
(cd $$(LIBUV_BUILD_DIR_$(1)) && \
231+
CC="$$(CC_$(1))" \
232+
CXX="$$(CXX_$(1))" \
233+
AR="$$(AR_$(1))" \
228234
$$(CFG_PYTHON) ./gyp_uv.py -f xcode \
229235
-D ninja \
230236
-R libuv)

mk/tests.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,14 @@ ifdef VERBOSE
6060
CTEST_TESTARGS += --verbose
6161
endif
6262

63+
# Setting locale ensures that gdb's output remains consistent.
64+
# This prevents tests from failing with some locales (fixes #17423).
65+
export LC_ALL=C
66+
6367
# If we're running perf then set this environment variable
6468
# to put the benchmarks into 'hard mode'
6569
ifeq ($(MAKECMDGOALS),perf)
66-
RUST_BENCH=1
67-
export RUST_BENCH
70+
export RUST_BENCH=1
6871
endif
6972

7073
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
@@ -194,9 +197,6 @@ check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
194197
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
195198
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
196199

197-
# NOTE: Remove after reprogramming windows bots
198-
check-fast: check-lite
199-
200200
# Some less critical tests that are not prone to breakage.
201201
# Not run as part of the normal test suite, but tested by bors on checkin.
202202
check-secondary: check-lexer check-pretty

src/compiletest/header.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ pub struct TestProps {
4242
pub pretty_mode: String,
4343
// Only compare pretty output and don't try compiling
4444
pub pretty_compare_only: bool,
45+
// Patterns which must not appear in the output of a cfail test.
46+
pub forbid_output: Vec<String>,
4547
}
4648

4749
// Load any test directives embedded in the file
@@ -59,6 +61,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
5961
let mut no_pretty_expanded = false;
6062
let mut pretty_mode = None;
6163
let mut pretty_compare_only = false;
64+
let mut forbid_output = Vec::new();
6265
iter_header(testfile, |ln| {
6366
match parse_error_pattern(ln) {
6467
Some(ep) => error_patterns.push(ep),
@@ -116,6 +119,11 @@ pub fn load_props(testfile: &Path) -> TestProps {
116119
None => ()
117120
};
118121

122+
match parse_forbid_output(ln) {
123+
Some(of) => forbid_output.push(of),
124+
None => (),
125+
}
126+
119127
true
120128
});
121129

@@ -132,7 +140,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
132140
no_prefer_dynamic: no_prefer_dynamic,
133141
no_pretty_expanded: no_pretty_expanded,
134142
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
135-
pretty_compare_only: pretty_compare_only
143+
pretty_compare_only: pretty_compare_only,
144+
forbid_output: forbid_output,
136145
}
137146
}
138147

@@ -210,6 +219,10 @@ fn parse_error_pattern(line: &str) -> Option<String> {
210219
parse_name_value_directive(line, "error-pattern")
211220
}
212221

222+
fn parse_forbid_output(line: &str) -> Option<String> {
223+
parse_name_value_directive(line, "forbid-output")
224+
}
225+
213226
fn parse_aux_build(line: &str) -> Option<String> {
214227
parse_name_value_directive(line, "aux-build")
215228
}

0 commit comments

Comments
 (0)