Skip to content

Commit 902697c

Browse files
tbelaireOliver Schneider
authored andcommitted
---
yaml --- r: 235046 b: refs/heads/stable c: 599bf45 h: refs/heads/master v: v3
1 parent 496db8e commit 902697c

File tree

220 files changed

+7863
-8603
lines changed

Some content is hidden

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

220 files changed

+7863
-8603
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: a5dec988026bbb2290c49e183f0d40d65ed15406
32+
refs/heads/stable: 599bf45ac9afc309332388fe4bc42a100e3d1586
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
*.exe
2020
*.fn
2121
*.html
22-
*.kdev4
2322
*.ky
2423
*.ll
2524
*.llvm

branches/stable/Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
# * tidy-basic - show file / line stats
6363
# * tidy-errors - show the highest rustc error code
6464
# * tidy-features - show the status of language and lib features
65-
# * rustc-stage$(stage) - Only build up to a specific stage
6665
#
6766
# Then mix in some of these environment variables to harness the
6867
# ultimate power of The Rust Build System.
@@ -91,7 +90,7 @@
9190
#
9291
# # Rust recipes for build system success
9392
#
94-
# // Modifying libstd? Use this command to run unit tests just on your change
93+
# // Modifying libstd? Use this comment to run unit tests just on your change
9594
# make check-stage1-std NO_REBUILD=1 NO_BENCH=1
9695
#
9796
# // Added a run-pass test? Use this to test running your test

branches/stable/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Rust is a fast systems programming language that guarantees
44
memory safety and offers painless concurrency ([no data races]).
55
It does not employ a garbage collector and has minimal runtime overhead.
66

7-
This repo contains the code for the compiler (`rustc`), as well
7+
This repo contains the code for `rustc`, the Rust compiler, as well
88
as standard libraries, tools and documentation for Rust.
99

1010
[no data races]: http://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html

branches/stable/RELEASES.md

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
Version 1.2.0 (August 2015)
2-
===========================
3-
4-
Highlights
5-
----------
6-
7-
* [Parallel codegen][parcodegen] is now working again, which can substantially
8-
speed up large builds in debug mode; It also gets another ~33% speedup when
9-
bootstrapping on a 4 core machine (using 8 jobs). It's not enabled by default,
10-
but will be "in the near future"
11-
12-
13-
[parcodegen]: https://github.com/rust-lang/rust/pull/26018
14-
15-
161
Version 1.1.0 (June 2015)
172
=========================
183

@@ -21,28 +6,29 @@ Version 1.1.0 (June 2015)
216
Highlights
227
----------
238

24-
* The [`std::fs` module has been expanded][fs] to expand the set of
9+
* The [`std::fs` module has been expanded][fs-expand] to expand the set of
2510
functionality exposed:
2611
* `DirEntry` now supports optimizations like `file_type` and `metadata` which
2712
don't incur a syscall on some platforms.
2813
* A `symlink_metadata` function has been added.
2914
* The `fs::Metadata` structure now lowers to its OS counterpart, providing
3015
access to all underlying information.
31-
* The compiler now contains extended explanations of many errors. When an error
32-
with an explanation occurs the compiler suggests using the `--explain` flag
33-
to read the explanation. Error explanations are also [available online][err-index].
16+
* The compiler contains extended explanations of many errors. When it
17+
emits such an error it also suggests using the `--explain` flag to
18+
read the extended explanations, which are also [cataloged on the web
19+
site][err].
3420
* Thanks to multiple [improvements][sk] to [type checking][pre], as
3521
well as other work, the time to bootstrap the compiler decreased by
3622
32%.
3723

3824
Libraries
3925
---------
4026

41-
* The [`str::split_whitespace`] method splits a string on unicode
27+
* The `str::split_whitespace` method splits a string on unicode
4228
whitespace boundaries.
4329
* On both Windows and Unix, new extension traits provide conversion of
4430
I/O types to and from the underlying system handles. On Unix, these
45-
traits are [`FromRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
31+
traits are [`FrowRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
4632
and `AsRawHandle`. These are implemented for `File`, `TcpStream`,
4733
`TcpListener`, and `UpdSocket`. Further implementations for
4834
`std::process` will be stabilized later.
@@ -94,14 +80,15 @@ Misc
9480
* [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
9581
with `Drop`][drop].
9682

97-
[`str::split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
83+
[`split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
84+
[`Iterator::cloned`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned
9885
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
9986
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
10087
[`std::os::unix::symlink`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
10188
[`IntoIterator`]: http://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
10289
[`From`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html
10390
[rf]: https://github.com/rust-lang/rust/pull/24491
104-
[err-index]: http://doc.rust-lang.org/error-index.html
91+
[err]: http://doc.rust-lang.org/error-index.html
10592
[sk]: https://github.com/rust-lang/rust/pull/24615
10693
[pre]: https://github.com/rust-lang/rust/pull/25323
10794
[file]: https://github.com/rust-lang/rust/pull/24598
@@ -264,6 +251,7 @@ Misc
264251
[sw]: https://github.com/rust-lang/rfcs/blob/master/text/1054-str-words.md
265252
[th]: https://github.com/rust-lang/rfcs/blob/master/text/0909-move-thread-local-to-std-thread.md
266253
[send-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0458-send-improvements.md
254+
[scoped]: http://static.rust-lang.org/doc/master/std/thread/fn.scoped.html
267255
[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
268256
[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
269257
[overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
@@ -273,10 +261,12 @@ Misc
273261
[string-pattern]: https://github.com/rust-lang/rust/pull/22466
274262
[oibit-final]: https://github.com/rust-lang/rust/pull/21689
275263
[reflect]: https://github.com/rust-lang/rust/pull/23712
264+
[debug-builder]: https://github.com/rust-lang/rfcs/blob/master/text/0640-debug-improvements.md
276265
[conversion]: https://github.com/rust-lang/rfcs/pull/529
277266
[num-traits]: https://github.com/rust-lang/rust/pull/23549
278267
[index-value]: https://github.com/rust-lang/rust/pull/23601
279268
[dropck]: https://github.com/rust-lang/rfcs/pull/769
269+
[fundamental]: https://github.com/rust-lang/rfcs/pull/1023
280270
[ci-compare]: https://gist.github.com/brson/a30a77836fbec057cbee
281271
[fn-inherit]: https://github.com/rust-lang/rust/pull/23282
282272
[fn-blanket]: https://github.com/rust-lang/rust/pull/23895
@@ -379,6 +369,7 @@ Version 1.0.0-alpha.2 (February 2015)
379369
[osstr]: https://github.com/rust-lang/rust/pull/21488
380370
[osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
381371
[Self]: https://github.com/rust-lang/rust/pull/22158
372+
[ufcs]: https://github.com/rust-lang/rust/pull/21077
382373
[ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
383374
[un]: https://github.com/rust-lang/rust/pull/22256
384375

branches/stable/configure

Lines changed: 14 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -899,18 +899,6 @@ then
899899
fi
900900
fi
901901

902-
# If the clang isn't already enabled, check for GCC, and if it is missing, turn
903-
# on clang as a backup.
904-
if [ -z "$CFG_ENABLE_CLANG" ]
905-
then
906-
CFG_GCC_VERSION=$("$CFG_GCC" --version 2>&1)
907-
if [ $? -ne 0 ]
908-
then
909-
step_msg "GCC not installed, will try using Clang"
910-
CFG_ENABLE_CLANG=1
911-
fi
912-
fi
913-
914902
# Okay, at this point, we have made up our minds about whether we are
915903
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
916904
if [ ! -z "$CFG_ENABLE_CLANG" ]
@@ -932,7 +920,7 @@ then
932920
LLVM_VERSION=$($LLVM_CONFIG --version)
933921

934922
case $LLVM_VERSION in
935-
(3.[5-7]*)
923+
(3.[5-6]*)
936924
msg "found ok version of LLVM: $LLVM_VERSION"
937925
;;
938926
(*)
@@ -1049,14 +1037,6 @@ for target_file in ${CFG_SRC_DIR}mk/cfg/*.mk; do
10491037
CFG_SUPPORTED_TARGET="${CFG_SUPPORTED_TARGET} $(basename "$target_file" .mk)"
10501038
done
10511039

1052-
# copy build-triples to host-triples so that builds are a subset of hosts
1053-
V_TEMP=""
1054-
for i in $CFG_BUILD $CFG_HOST;
1055-
do
1056-
echo "$V_TEMP" | grep -qF $i || V_TEMP="$V_TEMP${V_TEMP:+ }$i"
1057-
done
1058-
CFG_HOST=$V_TEMP
1059-
10601040
# copy host-triples to target-triples so that hosts are a subset of targets
10611041
V_TEMP=""
10621042
for i in $CFG_HOST $CFG_TARGET;
@@ -1114,7 +1094,7 @@ do
11141094
fi
11151095
;;
11161096

1117-
*-msvc)
1097+
x86_64-*-msvc)
11181098
# Currently the build system is not configured to build jemalloc
11191099
# with MSVC, so we omit this optional dependency.
11201100
step_msg "targeting MSVC, disabling jemalloc"
@@ -1154,45 +1134,22 @@ do
11541134
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11551135
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
11561136
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
1157-
putvar CFG_MSVC_ROOT
1158-
1159-
case $i in
1160-
x86_64-*)
1161-
bits=x86_64
1162-
msvc_part=amd64
1163-
;;
1164-
i686-*)
1165-
bits=i386
1166-
msvc_part=
1167-
;;
1168-
*)
1169-
err "can only target x86 targets for MSVC"
1170-
;;
1171-
esac
1172-
bindir="${CFG_MSVC_ROOT}/VC/bin"
1173-
if [ ! -z "$msvc_part" ]; then
1174-
bindir="$bindir/$msvc_part"
1175-
fi
1176-
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
1177-
eval CFG_MSVC_CL_$bits="\"$bindir/cl.exe\""
1178-
eval CFG_MSVC_LIB_$bits="\"$bindir/lib.exe\""
1179-
eval CFG_MSVC_LINK_$bits="\"$bindir/link.exe\""
1137+
CFG_MSVC_CL="${CFG_MSVC_ROOT}/VC/bin/amd64/cl.exe"
1138+
CFG_MSVC_LIB="${CFG_MSVC_ROOT}/VC/bin/amd64/lib.exe"
1139+
CFG_MSVC_LINK="${CFG_MSVC_ROOT}/VC/bin/amd64/link.exe"
11801140

11811141
vcvarsall="${CFG_MSVC_ROOT}/VC/vcvarsall.bat"
1182-
include_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %INCLUDE%")
1142+
CFG_MSVC_INCLUDE_PATH=$(cmd /c "\"$vcvarsall\" amd64 && cmd /c echo %INCLUDE%")
11831143
need_ok "failed to learn about MSVC's INCLUDE"
1184-
lib_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %LIB%")
1144+
CFG_MSVC_LIB_PATH=$(cmd /c "\"$vcvarsall\" amd64 && cmd /c echo %LIB%")
11851145
need_ok "failed to learn about MSVC's LIB"
11861146

1187-
eval CFG_MSVC_INCLUDE_PATH_${bits}="\"$include_path\""
1188-
eval CFG_MSVC_LIB_PATH_${bits}="\"$lib_path\""
1189-
1190-
putvar CFG_MSVC_BINDIR_${bits}
1191-
putvar CFG_MSVC_CL_${bits}
1192-
putvar CFG_MSVC_LIB_${bits}
1193-
putvar CFG_MSVC_LINK_${bits}
1194-
putvar CFG_MSVC_INCLUDE_PATH_${bits}
1195-
putvar CFG_MSVC_LIB_PATH_${bits}
1147+
putvar CFG_MSVC_ROOT
1148+
putvar CFG_MSVC_CL
1149+
putvar CFG_MSVC_LIB
1150+
putvar CFG_MSVC_LINK
1151+
putvar CFG_MSVC_INCLUDE_PATH
1152+
putvar CFG_MSVC_LIB_PATH
11961153
;;
11971154

11981155
*)
@@ -1431,19 +1388,8 @@ do
14311388

14321389
msg "configuring LLVM with:"
14331390
msg "$CMAKE_ARGS"
1434-
case "$t" in
1435-
x86_64-*)
1436-
generator="Visual Studio 12 2013 Win64"
1437-
;;
1438-
i686-*)
1439-
generator="Visual Studio 12 2013"
1440-
;;
1441-
*)
1442-
err "can only build LLVM for x86 platforms"
1443-
;;
1444-
esac
14451391
(cd $LLVM_BUILD_DIR && "$CFG_CMAKE" $CFG_LLVM_SRC_DIR \
1446-
-G "$generator" \
1392+
-G "Visual Studio 12 2013 Win64" \
14471393
$CMAKE_ARGS)
14481394
need_ok "LLVM cmake configure failed"
14491395
fi

branches/stable/mk/cfg/i686-pc-windows-msvc.mk

Lines changed: 0 additions & 29 deletions
This file was deleted.

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

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# x86_64-pc-windows-msvc configuration
2-
CC_x86_64-pc-windows-msvc="$(CFG_MSVC_CL_x86_64)" -nologo
3-
LINK_x86_64-pc-windows-msvc="$(CFG_MSVC_LINK_x86_64)" -nologo
4-
CXX_x86_64-pc-windows-msvc="$(CFG_MSVC_CL_x86_64)" -nologo
5-
CPP_x86_64-pc-windows-msvc="$(CFG_MSVC_CL_x86_64)" -nologo
6-
AR_x86_64-pc-windows-msvc="$(CFG_MSVC_LIB_x86_64)" -nologo
2+
CC_x86_64-pc-windows-msvc="$(CFG_MSVC_CL)" -nologo
3+
LINK_x86_64-pc-windows-msvc="$(CFG_MSVC_LINK)" -nologo
4+
CXX_x86_64-pc-windows-msvc="$(CFG_MSVC_CL)" -nologo
5+
CPP_x86_64-pc-windows-msvc="$(CFG_MSVC_CL)" -nologo
6+
AR_x86_64-pc-windows-msvc="$(CFG_MSVC_LIB)" -nologo
77
CFG_LIB_NAME_x86_64-pc-windows-msvc=$(1).dll
88
CFG_STATIC_LIB_NAME_x86_64-pc-windows-msvc=$(1).lib
99
CFG_LIB_GLOB_x86_64-pc-windows-msvc=$(1)-*.{dll,lib}
@@ -23,6 +23,64 @@ CFG_RUN_x86_64-pc-windows-msvc=$(2)
2323
CFG_RUN_TARG_x86_64-pc-windows-msvc=$(call CFG_RUN_x86_64-pc-windows-msvc,,$(2))
2424
CFG_GNU_TRIPLE_x86_64-pc-windows-msvc := x86_64-pc-win32
2525

26+
# These two environment variables are scraped by the `./configure` script and
27+
# are necessary for `cl.exe` to find standard headers (the INCLUDE variable) and
28+
# for `link.exe` to find standard libraries (the LIB variable).
29+
ifdef CFG_MSVC_INCLUDE_PATH
30+
export INCLUDE := $(CFG_MSVC_INCLUDE_PATH)
31+
endif
32+
ifdef CFG_MSVC_LIB_PATH
33+
export LIB := $(CFG_MSVC_LIB_PATH)
34+
endif
35+
36+
# Unfortunately `link.exe` is also a program in `/usr/bin` on MinGW installs,
37+
# but it's not the one that we want. As a result we make sure that our detected
38+
# `link.exe` shows up in PATH first.
39+
ifdef CFG_MSVC_LINK
40+
export PATH := $(CFG_MSVC_ROOT)/VC/bin/amd64:$(PATH)
41+
endif
42+
43+
# There are more comments about this available in the target specification for
44+
# Windows MSVC in the compiler, but the gist of it is that we use `llvm-ar.exe`
45+
# instead of `lib.exe` for assembling archives, so we need to inject this custom
46+
# dependency here.
47+
NATIVE_TOOL_DEPS_core_T_x86_64-pc-windows-msvc += llvm-ar.exe
48+
INSTALLED_BINS_x86_64-pc-windows-msvc += llvm-ar.exe
49+
50+
# When working with MSVC on windows, each DLL needs to explicitly declare its
51+
# interface to the outside world through some means. The options for doing so
52+
# include:
53+
#
54+
# 1. A custom attribute on each function itself
55+
# 2. A linker argument saying what to export
56+
# 3. A file which lists all symbols that need to be exported
57+
#
58+
# The Rust compiler takes care (1) for us for all Rust code by annotating all
59+
# public-facing functions with dllexport, but we have a few native dependencies
60+
# which need to cross the DLL boundary. The most important of these dependencies
61+
# is LLVM which is linked into `rustc_llvm.dll` but primarily used from
62+
# `rustc_trans.dll`. This means that many of LLVM's C API functions need to be
63+
# exposed from `rustc_llvm.dll` to be forwarded over the boundary.
64+
#
65+
# Unfortunately, at this time, LLVM does not handle this sort of exportation on
66+
# Windows for us, so we're forced to do it ourselves if we want it (which seems
67+
# like the path of least resistance right now). To do this we generate a `.DEF`
68+
# file [1] which we then custom-pass to the linker when building the rustc_llvm
69+
# crate. This DEF file list all symbols that are exported from
70+
# `src/librustc_llvm/lib.rs` and is generated by a small python script.
71+
#
72+
# Fun times!
73+
#
74+
# [1]: https://msdn.microsoft.com/en-us/library/28d6s79h.aspx
75+
RUSTFLAGS_rustc_llvm_T_x86_64-pc-windows-msvc += \
76+
-C link-args="-DEF:x86_64-pc-windows-msvc/rt/rustc_llvm.def"
77+
CUSTOM_DEPS_rustc_llvm_T_x86_64-pc-windows-msvc += \
78+
x86_64-pc-windows-msvc/rt/rustc_llvm.def
79+
80+
x86_64-pc-windows-msvc/rt/rustc_llvm.def: $(S)src/etc/mklldef.py \
81+
$(S)src/librustc_llvm/lib.rs
82+
$(CFG_PYTHON) $^ $@ rustc_llvm-$(CFG_FILENAME_EXTRA)
83+
2684
# All windows nightiles are currently a GNU triple, so this MSVC triple is not
2785
# bootstrapping from itself. This is relevant during stage0, and other parts of
2886
# the build system take this into account.

branches/stable/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.3.0
16+
CFG_RELEASE_NUM=1.2.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

0 commit comments

Comments
 (0)