Skip to content

Commit 50588cd

Browse files
committed
---
yaml --- r: 275359 b: refs/heads/master c: 9debf51 h: refs/heads/master i: 275357: 19d1f5e 275355: 6c4fe8f 275351: d80d602 275343: e280696 275327: 156c95e
1 parent d4019f1 commit 50588cd

File tree

1,187 files changed

+38150
-26929
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,187 files changed

+38150
-26929
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 561337223fc5aa6d97457bdd133f7404b6ae562a
2+
refs/heads/master: 9debf51f4b8a5d437df1abca57c5a58c45297b60
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
/stage3/
7979
/test/
8080
/tmp/
81+
/obj/
8182
TAGS
8283
TAGS.emacs
8384
TAGS.vi

trunk/COMPILER_TESTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn test_foo() {
7777
}
7878
```
7979

80-
Note that not all headers have meaning when customized too a revision.
80+
Note that not all headers have meaning when customized to a revision.
8181
For example, the `ignore-test` header (and all "ignore" headers)
8282
currently only apply to the test as a whole, not to particular
8383
revisions. The only headers that are intended to really work when

trunk/CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ which includes important information about what platform you're on, what
7171
version of Rust you're using, etc.
7272

7373
Sometimes, a backtrace is helpful, and so including that is nice. To get
74-
a backtrace, set the `RUST_BACKTRACE` environment variable. The easiest way
74+
a backtrace, set the `RUST_BACKTRACE` environment variable to a value
75+
other than `0`. The easiest way
7576
to do this is to invoke `rustc` like this:
7677

7778
```bash
@@ -132,8 +133,8 @@ Some common make targets are:
132133
- `make check-stage1-std NO_REBUILD=1` - test the standard library without
133134
rebuilding the entire compiler
134135
- `make check TESTNAME=<substring-of-test-name>` - Run a matching set of tests.
135-
- `TESTNAME` should be a substring of the tests to match against e.g. it could
136-
be the fully qualified test name, or just a part of it.
136+
- `TESTNAME` should be a substring of the tests to match against e.g. it could
137+
be the fully qualified test name, or just a part of it.
137138
`TESTNAME=collections::hash::map::test_map::test_capacity_not_less_than_len`
138139
or `TESTNAME=test_capacity_not_less_than_len`.
139140
- `make check-stage1-rpass TESTNAME=<substring-of-test-name>` - Run a single

trunk/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ build.
7777
7878
Download [MinGW from
7979
here](http://mingw-w64.org/doku.php/download/mingw-builds), and choose the
80-
`threads=win32,exceptions=dwarf/seh` flavor when installing. Also, make sure to install to a path without spaces in it. After installing,
80+
`version=4.9.x,threads=win32,exceptions=dwarf/seh` flavor when installing. Also, make sure to install to a path without spaces in it. After installing,
8181
add its `bin` directory to your `PATH`. This is due to [#28260](https://github.com/rust-lang/rust/issues/28260), in the future,
8282
installing from pacman should be just fine.
8383
@@ -177,10 +177,11 @@ To contribute to Rust, please see [CONTRIBUTING](CONTRIBUTING.md).
177177
Rust has an [IRC] culture and most real-time collaboration happens in a
178178
variety of channels on Mozilla's IRC network, irc.mozilla.org. The
179179
most popular channel is [#rust], a venue for general discussion about
180-
Rust, and a good place to ask for help.
180+
Rust. And a good place to ask for help would be [#rust-beginners].
181181
182182
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
183183
[#rust]: irc://irc.mozilla.org/rust
184+
[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
184185
185186
## License
186187

trunk/RELEASES.md

Lines changed: 498 additions & 2 deletions
Large diffs are not rendered by default.

trunk/configure

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,8 @@ opt dist-host-only 0 "only install bins for the host architecture"
607607
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
608608
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
609609
opt rustbuild 0 "use the rust and cargo based build system"
610+
opt orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit"
611+
opt codegen-tests 1 "run the src/test/codegen tests"
610612

611613
# Optimization and debugging options. These may be overridden by the release channel, etc.
612614
opt_nosave optimize 1 "build optimized rust code"
@@ -713,17 +715,7 @@ if [ -n "$CFG_ENABLE_DEBUG_ASSERTIONS" ]; then putvar CFG_ENABLE_DEBUG_ASSERTION
713715
if [ -n "$CFG_ENABLE_DEBUGINFO" ]; then putvar CFG_ENABLE_DEBUGINFO; fi
714716
if [ -n "$CFG_ENABLE_DEBUG_JEMALLOC" ]; then putvar CFG_ENABLE_DEBUG_JEMALLOC; fi
715717

716-
# A magic value that allows the compiler to use unstable features
717-
# during the bootstrap even when doing so would normally be an error
718-
# because of feature staging or because the build turns on
719-
# warnings-as-errors and unstable features default to warnings. The
720-
# build has to match this key in an env var. Meant to be a mild
721-
# deterrent from users just turning on unstable features on the stable
722-
# channel.
723-
# Basing CFG_BOOTSTRAP_KEY on CFG_BOOTSTRAP_KEY lets it get picked up
724-
# during a Makefile reconfig.
725-
CFG_BOOTSTRAP_KEY="${CFG_BOOTSTRAP_KEY-`date +%H:%M:%S`}"
726-
putvar CFG_BOOTSTRAP_KEY
718+
if [ -n "$CFG_ENABLE_ORBIT" ]; then putvar CFG_ENABLE_ORBIT; fi
727719

728720
step_msg "looking for build programs"
729721

@@ -966,11 +958,11 @@ then
966958
LLVM_VERSION=$($LLVM_CONFIG --version)
967959

968960
case $LLVM_VERSION in
969-
(3.[5-8]*)
961+
(3.[6-8]*)
970962
msg "found ok version of LLVM: $LLVM_VERSION"
971963
;;
972964
(*)
973-
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
965+
err "bad LLVM version: $LLVM_VERSION, need >=3.6"
974966
;;
975967
esac
976968
fi
@@ -1031,7 +1023,7 @@ then
10311023
if [ -n "$CFG_OSX_CLANG_VERSION" ]
10321024
then
10331025
case $CFG_OSX_CLANG_VERSION in
1034-
(7.0* | 7.1* | 7.2*)
1026+
(7.0* | 7.1* | 7.2* | 7.3*)
10351027
step_msg "found ok version of APPLE CLANG: $CFG_OSX_CLANG_VERSION"
10361028
;;
10371029
(*)
@@ -1249,7 +1241,7 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
12491241
bits=x86_64
12501242
msvc_part=amd64
12511243
;;
1252-
i686-*)
1244+
i*86-*)
12531245
bits=i386
12541246
msvc_part=
12551247
;;
@@ -1494,7 +1486,9 @@ do
14941486
LLVM_INST_DIR=$CFG_LLVM_ROOT
14951487
do_reconfigure=0
14961488
# Check that LLVm FileCheck is available. Needed for the tests
1497-
need_cmd $LLVM_INST_DIR/bin/FileCheck
1489+
if [ -z "$CFG_DISABLE_CODEGEN_TESTS" ]; then
1490+
need_cmd $LLVM_INST_DIR/bin/FileCheck
1491+
fi
14981492
fi
14991493

15001494
if [ ${do_reconfigure} -ne 0 ]

trunk/man/rustc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,15 @@ the maximum number of threads used for this purpose.
268268

269269
.TP
270270
\fBRUST_TEST_NOCAPTURE\fR
271-
A synonym for the --nocapture flag.
271+
If set to a value other than "0", a synonym for the --nocapture flag.
272272

273273
.TP
274274
\fBRUST_MIN_STACK\fR
275275
Sets the minimum stack size for new threads.
276276

277277
.TP
278278
\fBRUST_BACKTRACE\fR
279-
If set, produces a backtrace in the output of a program which panics.
279+
If set to a value different than "0", produces a backtrace in the output of a program which panics.
280280

281281
.SH "EXAMPLES"
282282
To build an executable from a source file with a main function:

trunk/mk/cfg/i586-unknown-linux-gnu.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ CFG_LIB_NAME_i586-unknown-linux-gnu=lib$(1).so
77
CFG_STATIC_LIB_NAME_i586-unknown-linux-gnu=lib$(1).a
88
CFG_LIB_GLOB_i586-unknown-linux-gnu=lib$(1)-*.so
99
CFG_LIB_DSYM_GLOB_i586-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
10-
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS)
11-
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
12-
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
10+
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS) -march=pentium
11+
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS) -march=pentium
12+
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS) -march=pentium
1313
CFG_GCCISH_LINK_FLAGS_i586-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
1414
CFG_GCCISH_DEF_FLAG_i586-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
1515
CFG_LLC_FLAGS_i586-unknown-linux-gnu :=

trunk/mk/crates.mk

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ TARGET_CRATES := libc std term \
5353
getopts collections test rand \
5454
core alloc \
5555
rustc_unicode rustc_bitflags \
56-
alloc_system alloc_jemalloc rustc_const_eval
56+
alloc_system alloc_jemalloc
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
59-
rustc_data_structures rustc_front rustc_platform_intrinsics \
60-
rustc_plugin rustc_metadata rustc_passes
59+
rustc_data_structures rustc_platform_intrinsics \
60+
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
61+
rustc_const_eval rustc_const_math rustc_incremental
6162
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
6263
flate arena graphviz rbml log serialize
6364
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
@@ -91,38 +92,43 @@ DEPS_test := std getopts term native:rust_test_helpers
9192
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9293
DEPS_syntax_ext := syntax fmt_macros
9394

94-
DEPS_rustc_const_eval := std syntax
95+
DEPS_rustc_const_math := std syntax log serialize
96+
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize \
97+
rustc_back graphviz
9598

96-
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
97-
log graphviz rustc_llvm rustc_back rustc_data_structures\
98-
rustc_const_eval
99-
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
100-
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
99+
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml \
100+
log graphviz rustc_back rustc_data_structures\
101+
rustc_const_math
102+
DEPS_rustc_back := std syntax flate log libc
103+
DEPS_rustc_borrowck := rustc rustc_mir log graphviz syntax
101104
DEPS_rustc_data_structures := std log serialize
102105
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
103106
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
104-
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
105-
rustc_metadata syntax_ext rustc_passes
106-
DEPS_rustc_front := std syntax log serialize
107-
DEPS_rustc_lint := rustc log syntax
107+
rustc_trans rustc_privacy rustc_lint rustc_plugin \
108+
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval \
109+
rustc_incremental
110+
DEPS_rustc_lint := rustc log syntax rustc_const_eval
108111
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
109-
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_eval
110-
DEPS_rustc_passes := syntax rustc core rustc_front
111-
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_eval
112-
DEPS_rustc_resolve := arena rustc rustc_front log syntax
113-
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
112+
DEPS_rustc_metadata := rustc syntax rbml rustc_const_math
113+
DEPS_rustc_passes := syntax rustc core rustc_const_eval
114+
DEPS_rustc_mir := rustc syntax rustc_const_math rustc_const_eval
115+
DEPS_rustc_resolve := arena rustc log syntax
116+
DEPS_rustc_platform_intrinsics := std
114117
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
115-
DEPS_rustc_privacy := rustc rustc_front log syntax
118+
DEPS_rustc_privacy := rustc log syntax
116119
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
117-
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
118-
rustc_const_eval
119-
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
120+
log syntax serialize rustc_llvm rustc_platform_intrinsics \
121+
rustc_const_math rustc_const_eval rustc_incremental
122+
DEPS_rustc_incremental := rbml rustc serialize rustc_data_structures
123+
DEPS_rustc_save_analysis := rustc log syntax
124+
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics rustc_const_math \
125+
rustc_const_eval
120126

121127
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
122-
test rustc_lint rustc_front
128+
test rustc_lint rustc_const_eval
123129

124130

125-
TOOL_DEPS_compiletest := test getopts
131+
TOOL_DEPS_compiletest := test getopts log
126132
TOOL_DEPS_rustdoc := rustdoc
127133
TOOL_DEPS_rustc := rustc_driver
128134
TOOL_DEPS_rustbook := std rustdoc

trunk/mk/main.mk

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.9.0
16+
CFG_RELEASE_NUM=1.10.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
@@ -24,6 +24,17 @@ CFG_PRERELEASE_VERSION=.1
2424
# versions in the same place
2525
CFG_FILENAME_EXTRA=$(shell printf '%s' $(CFG_RELEASE)$(CFG_EXTRA_FILENAME) | $(CFG_HASH_COMMAND))
2626

27+
# A magic value that allows the compiler to use unstable features during the
28+
# bootstrap even when doing so would normally be an error because of feature
29+
# staging or because the build turns on warnings-as-errors and unstable features
30+
# default to warnings. The build has to match this key in an env var.
31+
#
32+
# This value is keyed off the release to ensure that all compilers for one
33+
# particular release have the same bootstrap key. Note that this is
34+
# intentionally not "secure" by any definition, this is largely just a deterrent
35+
# from users enabling unstable features on the stable compiler.
36+
CFG_BOOTSTRAP_KEY=$(CFG_FILENAME_EXTRA)
37+
2738
ifeq ($(CFG_RELEASE_CHANNEL),stable)
2839
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
2940
CFG_RELEASE=$(CFG_RELEASE_NUM)
@@ -134,6 +145,11 @@ ifdef CFG_ENABLE_DEBUGINFO
134145
CFG_RUSTC_FLAGS += -g
135146
endif
136147

148+
ifdef CFG_ENABLE_ORBIT
149+
$(info cfg: launching MIR (CFG_ENABLE_ORBIT))
150+
CFG_RUSTC_FLAGS += -Z orbit
151+
endif
152+
137153
ifdef SAVE_TEMPS
138154
CFG_RUSTC_FLAGS += --save-temps
139155
endif
@@ -488,7 +504,7 @@ endif
488504
LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3) := \
489505
$$(CURDIR)/$$(HLIB$(1)_H_$(3)):$$(CFG_LLVM_INST_DIR_$(3))/lib
490506
LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3) := \
491-
$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))
507+
$$(CURDIR)/$$(TLIB$(1)_T_$(2)_H_$(3))
492508

493509
HOST_RPATH_VAR$(1)_T_$(2)_H_$(3) := \
494510
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))=$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3)):$$$$$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))
@@ -501,18 +517,14 @@ RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(HOST_RPATH_VAR$(1)_T_$(2)_H_$(3))
501517
# if you're building a cross config, the host->* parts are
502518
# effectively stage1, since it uses the just-built stage0.
503519
#
504-
# This logic is similar to how the LD_LIBRARY_PATH variable must
505-
# change be slightly different when doing cross compilations.
506-
# The build doesn't copy over all target libraries into
507-
# a new directory, so we need to point the library path at
508-
# the build directory where all the target libraries came
509-
# from (the stage0 build host). Otherwise the relative rpaths
510-
# inside of the rustc binary won't get resolved correctly.
520+
# Also be sure to use the right rpath because we're loading libraries from the
521+
# CFG_BUILD's stage1 directory for our target, so switch this one instance of
522+
# `RPATH_VAR` to get the bootstrap working.
511523
ifeq ($(1),0)
512524
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
513525
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
514526

515-
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR$(1)_T_$(2)_H_$(3))
527+
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR1_T_$(2)_H_$$(CFG_BUILD))
516528
endif
517529
endif
518530

trunk/mk/rt.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ else ifeq ($(findstring android, $(OSTYPE_$(1))), android)
157157
# If the test suite passes, however, without symbol prefixes then we should be
158158
# good to go!
159159
JEMALLOC_ARGS_$(1) := --disable-tls --with-jemalloc-prefix=je_
160+
else ifeq ($(findstring dragonfly, $(OSTYPE_$(1))), dragonfly)
161+
JEMALLOC_ARGS_$(1) := --with-jemalloc-prefix=je_
160162
endif
161163

162164
ifdef CFG_ENABLE_DEBUG_JEMALLOC
@@ -236,11 +238,11 @@ COMPRT_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(COMPRT_NAME_$(1))
236238
COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt
237239

238240
ifeq ($$(findstring msvc,$(1)),msvc)
239-
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1))
241+
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$$(CFG_BUILD))
240242
@$$(call E, cmake: compiler-rt)
241243
$$(Q)cd "$$(COMPRT_BUILD_DIR_$(1))"; $$(CFG_CMAKE) "$(S)src/compiler-rt" \
242244
-DCMAKE_BUILD_TYPE=$$(LLVM_BUILD_CONFIG_MODE) \
243-
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$(1)) \
245+
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$$(CFG_BUILD)) \
244246
-G"$$(CFG_CMAKE_GENERATOR)"
245247
$$(Q)$$(CFG_CMAKE) --build "$$(COMPRT_BUILD_DIR_$(1))" \
246248
--target lib/builtins/builtins \

trunk/mk/target.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8989
$$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
9090
--out-dir $$(@D) \
9191
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
92+
-C metadata=$$(CFG_FILENAME_EXTRA) \
9293
$$<
9394
@touch -r $$@.start_time $$@ && rm $$@.start_time
9495
$$(call LIST_ALL_OLD_GLOB_MATCHES, \

0 commit comments

Comments
 (0)