Skip to content

Commit 2eed03e

Browse files
committed
---
yaml --- r: 218166 b: refs/heads/tmp c: c2f4f11 h: refs/heads/master v: v3
1 parent b8b8729 commit 2eed03e

File tree

303 files changed

+9801
-12020
lines changed

Some content is hidden

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

303 files changed

+9801
-12020
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: 18adf6230e2e229d4d73391cebff060afc5e5aaa
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 8d94bbf106dfee6e722ac3896b7329bce1fd7120
28+
refs/heads/tmp: c2f4f11443ba9e8eb0b69f245bcfc7eb985082fa
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: e6596d0052e79e6393bbee3538bb122930d89887
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/.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/tmp/CONTRIBUTING.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,6 @@ feature. We use the 'fork and pull' model described there.
8383

8484
Please make pull requests against the `master` branch.
8585

86-
Compiling all of `make check` can take a while. When testing your pull request,
87-
consider using one of the more specialized `make` targets to cut down on the
88-
amount of time you have to wait. You need to have built the compiler at least
89-
once before running these will work, but that’s only one full build rather than
90-
one each time.
91-
92-
$ make -j8 rustc-stage1 && make check-stage1
93-
94-
is one such example, which builds just `rustc`, and then runs the tests. If
95-
you’re adding something to the standard library, try
96-
97-
$ make -j8 check-stage1-std NO_REBUILD=1
98-
99-
This will not rebuild the compiler, but will run the tests.
100-
10186
All pull requests are reviewed by another person. We have a bot,
10287
@rust-highfive, that will automatically assign a random person to review your
10388
request.
@@ -123,10 +108,6 @@ will run all the tests on every platform we support. If it all works out,
123108

124109
[merge-queue]: http://buildbot.rust-lang.org/homu/queue/rust
125110

126-
Speaking of tests, Rust has a comprehensive test suite. More information about
127-
it can be found
128-
[here](https://github.com/rust-lang/rust-wiki-backup/blob/master/Note-testsuite.md).
129-
130111
## Writing Documentation
131112

132113
Documentation improvements are very welcome. The source of `doc.rust-lang.org`

branches/tmp/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/tmp/README.md

Lines changed: 2 additions & 2 deletions
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
@@ -73,7 +73,7 @@ Read ["Installing Rust"] from [The Book].
7373
```
7474
7575
3. Run `mingw32_shell.bat` or `mingw64_shell.bat` from wherever you installed
76-
MSYS2 (i.e. `C:\msys`), depending on whether you want 32-bit or 64-bit Rust.
76+
MYSY2 (i.e. `C:\msys`), depending on whether you want 32-bit or 64-bit Rust.
7777
7878
4. Navigate to Rust's source code, configure and build it:
7979

branches/tmp/RELEASES.md

Lines changed: 9 additions & 19 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,7 +6,7 @@ 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.
@@ -38,11 +23,11 @@ Highlights
3823
Libraries
3924
---------
4025

41-
* The [`str::split_whitespace`] method splits a string on unicode
26+
* The `str::split_whitespace` method splits a string on unicode
4227
whitespace boundaries.
4328
* On both Windows and Unix, new extension traits provide conversion of
4429
I/O types to and from the underlying system handles. On Unix, these
45-
traits are [`FromRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
30+
traits are [`FrowRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
4631
and `AsRawHandle`. These are implemented for `File`, `TcpStream`,
4732
`TcpListener`, and `UpdSocket`. Further implementations for
4833
`std::process` will be stabilized later.
@@ -94,7 +79,8 @@ Misc
9479
* [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
9580
with `Drop`][drop].
9681

97-
[`str::split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
82+
[`split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
83+
[`Iterator::cloned`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned
9884
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
9985
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
10086
[`std::os::unix::symlink`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
@@ -264,6 +250,7 @@ Misc
264250
[sw]: https://github.com/rust-lang/rfcs/blob/master/text/1054-str-words.md
265251
[th]: https://github.com/rust-lang/rfcs/blob/master/text/0909-move-thread-local-to-std-thread.md
266252
[send-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0458-send-improvements.md
253+
[scoped]: http://static.rust-lang.org/doc/master/std/thread/fn.scoped.html
267254
[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
268255
[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
269256
[overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
@@ -273,10 +260,12 @@ Misc
273260
[string-pattern]: https://github.com/rust-lang/rust/pull/22466
274261
[oibit-final]: https://github.com/rust-lang/rust/pull/21689
275262
[reflect]: https://github.com/rust-lang/rust/pull/23712
263+
[debug-builder]: https://github.com/rust-lang/rfcs/blob/master/text/0640-debug-improvements.md
276264
[conversion]: https://github.com/rust-lang/rfcs/pull/529
277265
[num-traits]: https://github.com/rust-lang/rust/pull/23549
278266
[index-value]: https://github.com/rust-lang/rust/pull/23601
279267
[dropck]: https://github.com/rust-lang/rfcs/pull/769
268+
[fundamental]: https://github.com/rust-lang/rfcs/pull/1023
280269
[ci-compare]: https://gist.github.com/brson/a30a77836fbec057cbee
281270
[fn-inherit]: https://github.com/rust-lang/rust/pull/23282
282271
[fn-blanket]: https://github.com/rust-lang/rust/pull/23895
@@ -379,6 +368,7 @@ Version 1.0.0-alpha.2 (February 2015)
379368
[osstr]: https://github.com/rust-lang/rust/pull/21488
380369
[osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
381370
[Self]: https://github.com/rust-lang/rust/pull/22158
371+
[ufcs]: https://github.com/rust-lang/rust/pull/21077
382372
[ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
383373
[un]: https://github.com/rust-lang/rust/pull/22256
384374

branches/tmp/configure

Lines changed: 13 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,6 @@ case $CFG_OSTYPE in
405405
CFG_OSTYPE=unknown-openbsd
406406
;;
407407

408-
NetBSD)
409-
CFG_OSTYPE=unknown-netbsd
410-
;;
411-
412408
Darwin)
413409
CFG_OSTYPE=apple-darwin
414410
;;
@@ -1118,7 +1114,7 @@ do
11181114
fi
11191115
;;
11201116

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

11851161
vcvarsall="${CFG_MSVC_ROOT}/VC/vcvarsall.bat"
1186-
include_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %INCLUDE%")
1162+
CFG_MSVC_INCLUDE_PATH=$(cmd /c "\"$vcvarsall\" amd64 && cmd /c echo %INCLUDE%")
11871163
need_ok "failed to learn about MSVC's INCLUDE"
1188-
lib_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %LIB%")
1164+
CFG_MSVC_LIB_PATH=$(cmd /c "\"$vcvarsall\" amd64 && cmd /c echo %LIB%")
11891165
need_ok "failed to learn about MSVC's LIB"
11901166

1191-
eval CFG_MSVC_INCLUDE_PATH_${bits}="\"$include_path\""
1192-
eval CFG_MSVC_LIB_PATH_${bits}="\"$lib_path\""
1193-
1194-
putvar CFG_MSVC_BINDIR_${bits}
1195-
putvar CFG_MSVC_CL_${bits}
1196-
putvar CFG_MSVC_LIB_${bits}
1197-
putvar CFG_MSVC_LINK_${bits}
1198-
putvar CFG_MSVC_INCLUDE_PATH_${bits}
1199-
putvar CFG_MSVC_LIB_PATH_${bits}
1167+
putvar CFG_MSVC_ROOT
1168+
putvar CFG_MSVC_CL
1169+
putvar CFG_MSVC_LIB
1170+
putvar CFG_MSVC_LINK
1171+
putvar CFG_MSVC_INCLUDE_PATH
1172+
putvar CFG_MSVC_LIB_PATH
12001173
;;
12011174

12021175
*)
@@ -1435,19 +1408,8 @@ do
14351408

14361409
msg "configuring LLVM with:"
14371410
msg "$CMAKE_ARGS"
1438-
case "$t" in
1439-
x86_64-*)
1440-
generator="Visual Studio 12 2013 Win64"
1441-
;;
1442-
i686-*)
1443-
generator="Visual Studio 12 2013"
1444-
;;
1445-
*)
1446-
err "can only build LLVM for x86 platforms"
1447-
;;
1448-
esac
14491411
(cd $LLVM_BUILD_DIR && "$CFG_CMAKE" $CFG_LLVM_SRC_DIR \
1450-
-G "$generator" \
1412+
-G "Visual Studio 12 2013 Win64" \
14511413
$CMAKE_ARGS)
14521414
need_ok "LLVM cmake configure failed"
14531415
fi

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

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

branches/tmp/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/tmp/mk/cfg/x86_64-unknown-netbsd.mk

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

0 commit comments

Comments
 (0)