Skip to content

Commit 89ec05f

Browse files
committed
---
yaml --- r: 216240 b: refs/heads/stable c: b0043db h: refs/heads/master v: v3
1 parent 437e181 commit 89ec05f

File tree

1,148 files changed

+18046
-45948
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,148 files changed

+18046
-45948
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/heads/tmp: 378a370ff2057afeb1eae86eb6e78c476866a4a6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: be1117113f60b8afedf90039b0dcb87148666567
32+
refs/heads/stable: b0043db4658feed7b7d17fd45285745d8af38001
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375

branches/stable/Makefile.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
#
7777
# * `CFG_ENABLE_VALGRIND=1` - Run tests under valgrind
7878
# * `VALGRIND_COMPILE=1` - Run the compiler itself under valgrind
79-
# (may require `CFG_ENABLE_VALGRIND`)
79+
# (requires `CFG_ENABLE_VALGRIND`)
8080
#
8181
# * `NO_REBUILD=1` - Don't rebootstrap when testing std
8282
# (and possibly other crates)
@@ -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/stable/configure

Lines changed: 27 additions & 3 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
@@ -325,6 +337,15 @@ to_gnu_triple() {
325337
esac
326338
}
327339

340+
# Prints the absolute path of a directory to stdout
341+
abs_path() {
342+
local _path="$1"
343+
# Unset CDPATH because it causes havok: it makes the destination unpredictable
344+
# and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null
345+
# for good measure.
346+
(unset CDPATH && cd "$_path" > /dev/null && pwd)
347+
}
348+
328349
msg "looking for configure programs"
329350
need_cmd cmp
330351
need_cmd mkdir
@@ -497,7 +518,7 @@ fi
497518

498519
DEFAULT_BUILD="${CFG_CPUTYPE}-${CFG_OSTYPE}"
499520

500-
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
521+
CFG_SRC_DIR="$(abs_path $(dirname $0))/"
501522
CFG_BUILD_DIR="$(pwd)/"
502523
CFG_SELF="$0"
503524
CFG_CONFIGURE_ARGS="$@"
@@ -633,8 +654,11 @@ esac
633654
# Adjust perf and debug options for debug mode
634655
if [ -n "$CFG_ENABLE_DEBUG" ]; then
635656
msg "debug mode enabled, setting performance options"
636-
CFG_DISABLE_OPTIMIZE=1
637-
CFG_DISABLE_OPTIMIZE_CXX=1
657+
if [ -z "$CFG_ENABLE_OPTIMIZE_PROVIDED" ]; then
658+
msg "optimization not explicitly enabled, disabling optimization"
659+
CFG_DISABLE_OPTIMIZE=1
660+
CFG_DISABLE_OPTIMIZE_CXX=1
661+
fi
638662
CFG_ENABLE_LLVM_ASSERTIONS=1
639663
CFG_ENABLE_DEBUG_ASSERTIONS=1
640664
CFG_ENABLE_DEBUG_JEMALLOC=1

branches/stable/mk/crates.mk

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,19 @@
5252
TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test rand \
5454
log graphviz core rbml alloc \
55-
unicode rustc_bitflags
55+
rustc_unicode rustc_bitflags
5656
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
57-
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint
57+
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
58+
rustc_data_structures
5859
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
5960
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
6061
TOOLS := compiletest rustdoc rustc rustbook
6162

6263
DEPS_core :=
6364
DEPS_libc := core
64-
DEPS_unicode := core
65+
DEPS_rustc_unicode := core
6566
DEPS_alloc := core libc native:jemalloc
66-
DEPS_std := core libc rand alloc collections unicode \
67+
DEPS_std := core libc rand alloc collections rustc_unicode \
6768
native:rust_builtin native:backtrace native:rustrt_native \
6869
rustc_bitflags
6970
DEPS_graphviz := std
@@ -80,9 +81,10 @@ DEPS_rustc_resolve := rustc log syntax
8081
DEPS_rustc_privacy := rustc log syntax
8182
DEPS_rustc_lint := rustc log syntax
8283
DEPS_rustc := syntax flate arena serialize getopts rbml \
83-
log graphviz rustc_llvm rustc_back
84+
log graphviz rustc_llvm rustc_back rustc_data_structures
8485
DEPS_rustc_llvm := native:rustllvm libc std
8586
DEPS_rustc_back := std syntax rustc_llvm flate log libc
87+
DEPS_rustc_data_structures := std log serialize
8688
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
8789
test rustc_lint
8890
DEPS_rustc_bitflags := core
@@ -94,7 +96,7 @@ DEPS_serialize := std log
9496
DEPS_rbml := std log serialize
9597
DEPS_term := std log
9698
DEPS_getopts := std
97-
DEPS_collections := core alloc unicode
99+
DEPS_collections := core alloc rustc_unicode
98100
DEPS_num := std
99101
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
100102
DEPS_rand := core
@@ -115,11 +117,11 @@ ONLY_RLIB_libc := 1
115117
ONLY_RLIB_alloc := 1
116118
ONLY_RLIB_rand := 1
117119
ONLY_RLIB_collections := 1
118-
ONLY_RLIB_unicode := 1
120+
ONLY_RLIB_rustc_unicode := 1
119121
ONLY_RLIB_rustc_bitflags := 1
120122

121123
# Documented-by-default crates
122-
DOC_CRATES := std alloc collections core libc unicode
124+
DOC_CRATES := std alloc collections core libc rustc_unicode
123125

124126
################################################################################
125127
# You should not need to edit below this line

branches/stable/mk/main.mk

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.0.0
16+
CFG_RELEASE_NUM=1.1.0
1717

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=.1
2222

2323
CFG_FILENAME_EXTRA=4e7c5e5c
2424

@@ -30,8 +30,12 @@ CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
3030
CFG_DISABLE_UNSTABLE_FEATURES=1
3131
endif
3232
ifeq ($(CFG_RELEASE_CHANNEL),beta)
33-
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta$(CFG_PRERELEASE_VERSION)
34-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-beta$(CFG_PRERELEASE_VERSION)
33+
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta
34+
# When building beta distributables just reuse the same "beta" name
35+
# so when we upload we'll always override the previous beta. This
36+
# doesn't actually impact the version reported by rustc - it's just
37+
# for file naming.
38+
CFG_PACKAGE_VERS=beta
3539
CFG_DISABLE_UNSTABLE_FEATURES=1
3640
endif
3741
ifeq ($(CFG_RELEASE_CHANNEL),nightly)

branches/stable/mk/platform.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ endif
4646
# see https://blog.mozilla.org/jseward/2012/06/05/valgrind-now-supports-jemalloc-builds-directly/
4747
ifdef CFG_VALGRIND
4848
CFG_VALGRIND += --error-exitcode=100 \
49-
--soname-synonyms=somalloc=NONE \
49+
--fair-sched=try \
5050
--quiet \
51+
--soname-synonyms=somalloc=NONE \
5152
--suppressions=$(CFG_SRC_DIR)src/etc/x86.supp \
5253
$(OS_SUPP)
5354
ifdef CFG_ENABLE_HELGRIND

branches/stable/mk/tests.mk

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
# The names of crates that must be tested
1717

18-
# libcore/libunicode tests are in a separate crate
18+
# libcore/librustc_unicode tests are in a separate crate
1919
DEPS_coretest :=
2020
$(eval $(call RUST_CRATE,coretest))
2121

2222
DEPS_collectionstest :=
2323
$(eval $(call RUST_CRATE,collectionstest))
2424

25-
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) \
25+
TEST_TARGET_CRATES = $(filter-out core rustc_unicode,$(TARGET_CRATES)) \
2626
collectionstest coretest
2727
TEST_DOC_CRATES = $(DOC_CRATES)
2828
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve \
@@ -753,20 +753,22 @@ PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
753753
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
754754
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
755755
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
756-
# The stage- and host-specific dependencies are for e.g. macro_crate_test which pulls in
757-
# external crates.
758-
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass =
759-
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full = $$(HLIB$(1)_H_$(3))/stamp.syntax $$(HLIB$(1)_H_$(3))/stamp.rustc
760-
PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
761-
PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
762-
PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
763756
PRETTY_DIRNAME_pretty-rpass = run-pass
764757
PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
765758
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
766759
PRETTY_DIRNAME_pretty-rfail = run-fail
767760
PRETTY_DIRNAME_pretty-bench = bench
768761
PRETTY_DIRNAME_pretty-pretty = pretty
769762

763+
define DEF_PRETTY_FULLDEPS
764+
PRETTY_DEPS$(1)_T_$(2)_H_$(3)_pretty-rpass-full = $$(CSREQ$(1)_T_$(3)_H_$(3))
765+
endef
766+
767+
$(foreach host,$(CFG_HOST), \
768+
$(foreach target,$(CFG_TARGET), \
769+
$(foreach stage,$(STAGES), \
770+
$(eval $(call DEF_PRETTY_FULLDEPS,$(stage),$(target),$(host))))))
771+
770772
define DEF_RUN_PRETTY_TEST
771773

772774
PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
@@ -780,7 +782,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
780782
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
781783
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
782784
$$(PRETTY_DEPS_$(4)) \
783-
$$(PRETTY_DEPS$(1)_H_$(3)_$(4))
785+
$$(PRETTY_DEPS$(1)_T_$(2)_H_$(3)_$(4))
784786
@$$(call E, run pretty-rpass [$(2)]: $$<)
785787
$$(Q)touch $$@.start_time
786788
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \

branches/stable/mk/util.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ else
1616
E = echo $(1)
1717
endif
1818

19+
print-%:
20+
@echo $*=$($*)
21+
1922
S := $(CFG_SRC_DIR)

branches/stable/src/compiletest/compiletest.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212

1313
#![feature(box_syntax)]
1414
#![feature(collections)]
15-
#![feature(old_io)]
1615
#![feature(rustc_private)]
17-
#![feature(unboxed_closures)]
1816
#![feature(std_misc)]
1917
#![feature(test)]
2018
#![feature(path_ext)]
2119
#![feature(str_char)]
20+
#![feature(libc)]
2221

2322
#![deny(warnings)]
2423

24+
extern crate libc;
2525
extern crate test;
2626
extern crate getopts;
2727

@@ -42,6 +42,7 @@ pub mod header;
4242
pub mod runtest;
4343
pub mod common;
4444
pub mod errors;
45+
mod raise_fd_limit;
4546

4647
pub fn main() {
4748
let config = parse_config(env::args().collect());
@@ -245,11 +246,7 @@ pub fn run_tests(config: &Config) {
245246
// sadly osx needs some file descriptor limits raised for running tests in
246247
// parallel (especially when we have lots and lots of child processes).
247248
// For context, see #8904
248-
#[allow(deprecated)]
249-
fn raise_fd_limit() {
250-
std::old_io::test::raise_fd_limit();
251-
}
252-
raise_fd_limit();
249+
unsafe { raise_fd_limit::raise_fd_limit(); }
253250
// Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
254251
// If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
255252
env::set_var("__COMPAT_LAYER", "RunAsInvoker");
@@ -371,7 +368,7 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test
371368
fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
372369
match full_version_line {
373370
Some(ref full_version_line)
374-
if full_version_line.trim().len() > 0 => {
371+
if !full_version_line.trim().is_empty() => {
375372
let full_version_line = full_version_line.trim();
376373

377374
// used to be a regex "(^|[^0-9])([0-9]\.[0-9])([^0-9]|$)"
@@ -411,7 +408,7 @@ fn extract_lldb_version(full_version_line: Option<String>) -> Option<String> {
411408

412409
match full_version_line {
413410
Some(ref full_version_line)
414-
if full_version_line.trim().len() > 0 => {
411+
if !full_version_line.trim().is_empty() => {
415412
let full_version_line = full_version_line.trim();
416413

417414
for (pos, l) in full_version_line.char_indices() {
@@ -429,7 +426,7 @@ fn extract_lldb_version(full_version_line: Option<String>) -> Option<String> {
429426
let vers = full_version_line[pos + 5..].chars().take_while(|c| {
430427
c.is_digit(10)
431428
}).collect::<String>();
432-
if vers.len() > 0 { return Some(vers) }
429+
if !vers.is_empty() { return Some(vers) }
433430
}
434431
println!("Could not extract LLDB version from line '{}'",
435432
full_version_line);

0 commit comments

Comments
 (0)