Skip to content

Commit 6434cf3

Browse files
committed
---
yaml --- r: 218232 b: refs/heads/master c: afe25a2 h: refs/heads/master v: v3
1 parent 7d974d2 commit 6434cf3

File tree

368 files changed

+14400
-11705
lines changed

Some content is hidden

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

368 files changed

+14400
-11705
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: b952c0e4e9f3c169c6647fd05fef68ae1119865a
2+
refs/heads/master: afe25a2d6aaa308cce861fab50014f6a9f57a269
33
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*.exe
2020
*.fn
2121
*.html
22+
*.kdev4
2223
*.ky
2324
*.ll
2425
*.llvm

trunk/CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,21 @@ 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+
86101
All pull requests are reviewed by another person. We have a bot,
87102
@rust-highfive, that will automatically assign a random person to review your
88103
request.
@@ -108,6 +123,10 @@ will run all the tests on every platform we support. If it all works out,
108123

109124
[merge-queue]: http://buildbot.rust-lang.org/homu/queue/rust
110125

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+
111130
## Writing Documentation
112131

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

trunk/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
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
6566
#
6667
# Then mix in some of these environment variables to harness the
6768
# ultimate power of The Rust Build System.
@@ -90,7 +91,7 @@
9091
#
9192
# # Rust recipes for build system success
9293
#
93-
# // Modifying libstd? Use this comment to run unit tests just on your change
94+
# // Modifying libstd? Use this command to run unit tests just on your change
9495
# make check-stage1-std NO_REBUILD=1 NO_BENCH=1
9596
#
9697
# // Added a run-pass test? Use this to test running your test

trunk/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 `rustc`, the Rust compiler, as well
7+
This repo contains the code for the compiler (`rustc`), 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-
MYSY2 (i.e. `C:\msys`), depending on whether you want 32-bit or 64-bit Rust.
76+
MSYS2 (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

trunk/RELEASES.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
116
Version 1.1.0 (June 2015)
217
=========================
318

@@ -6,29 +21,28 @@ Version 1.1.0 (June 2015)
621
Highlights
722
----------
823

9-
* The [`std::fs` module has been expanded][fs-expand] to expand the set of
24+
* The [`std::fs` module has been expanded][fs] to expand the set of
1025
functionality exposed:
1126
* `DirEntry` now supports optimizations like `file_type` and `metadata` which
1227
don't incur a syscall on some platforms.
1328
* A `symlink_metadata` function has been added.
1429
* The `fs::Metadata` structure now lowers to its OS counterpart, providing
1530
access to all underlying information.
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].
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].
2034
* Thanks to multiple [improvements][sk] to [type checking][pre], as
2135
well as other work, the time to bootstrap the compiler decreased by
2236
32%.
2337

2438
Libraries
2539
---------
2640

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

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
97+
[`str::split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
8598
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
8699
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
87100
[`std::os::unix::symlink`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
88101
[`IntoIterator`]: http://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
89102
[`From`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html
90103
[rf]: https://github.com/rust-lang/rust/pull/24491
91-
[err]: http://doc.rust-lang.org/error-index.html
104+
[err-index]: http://doc.rust-lang.org/error-index.html
92105
[sk]: https://github.com/rust-lang/rust/pull/24615
93106
[pre]: https://github.com/rust-lang/rust/pull/25323
94107
[file]: https://github.com/rust-lang/rust/pull/24598
@@ -251,7 +264,6 @@ Misc
251264
[sw]: https://github.com/rust-lang/rfcs/blob/master/text/1054-str-words.md
252265
[th]: https://github.com/rust-lang/rfcs/blob/master/text/0909-move-thread-local-to-std-thread.md
253266
[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
255267
[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
256268
[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
257269
[overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
@@ -261,12 +273,10 @@ Misc
261273
[string-pattern]: https://github.com/rust-lang/rust/pull/22466
262274
[oibit-final]: https://github.com/rust-lang/rust/pull/21689
263275
[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
265276
[conversion]: https://github.com/rust-lang/rfcs/pull/529
266277
[num-traits]: https://github.com/rust-lang/rust/pull/23549
267278
[index-value]: https://github.com/rust-lang/rust/pull/23601
268279
[dropck]: https://github.com/rust-lang/rfcs/pull/769
269-
[fundamental]: https://github.com/rust-lang/rfcs/pull/1023
270280
[ci-compare]: https://gist.github.com/brson/a30a77836fbec057cbee
271281
[fn-inherit]: https://github.com/rust-lang/rust/pull/23282
272282
[fn-blanket]: https://github.com/rust-lang/rust/pull/23895
@@ -369,7 +379,6 @@ Version 1.0.0-alpha.2 (February 2015)
369379
[osstr]: https://github.com/rust-lang/rust/pull/21488
370380
[osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
371381
[Self]: https://github.com/rust-lang/rust/pull/22158
372-
[ufcs]: https://github.com/rust-lang/rust/pull/21077
373382
[ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
374383
[un]: https://github.com/rust-lang/rust/pull/22256
375384

trunk/configure

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

408+
NetBSD)
409+
CFG_OSTYPE=unknown-netbsd
410+
;;
411+
408412
Darwin)
409413
CFG_OSTYPE=apple-darwin
410414
;;
@@ -899,6 +903,18 @@ then
899903
fi
900904
fi
901905

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

922938
case $LLVM_VERSION in
923-
(3.[5-6]*)
939+
(3.[5-7]*)
924940
msg "found ok version of LLVM: $LLVM_VERSION"
925941
;;
926942
(*)
@@ -1037,6 +1053,14 @@ for target_file in ${CFG_SRC_DIR}mk/cfg/*.mk; do
10371053
CFG_SUPPORTED_TARGET="${CFG_SUPPORTED_TARGET} $(basename "$target_file" .mk)"
10381054
done
10391055

1056+
# copy build-triples to host-triples so that builds are a subset of hosts
1057+
V_TEMP=""
1058+
for i in $CFG_BUILD $CFG_HOST;
1059+
do
1060+
echo "$V_TEMP" | grep -qF $i || V_TEMP="$V_TEMP${V_TEMP:+ }$i"
1061+
done
1062+
CFG_HOST=$V_TEMP
1063+
10401064
# copy host-triples to target-triples so that hosts are a subset of targets
10411065
V_TEMP=""
10421066
for i in $CFG_HOST $CFG_TARGET;
@@ -1094,7 +1118,7 @@ do
10941118
fi
10951119
;;
10961120

1097-
x86_64-*-msvc)
1121+
*-msvc)
10981122
# Currently the build system is not configured to build jemalloc
10991123
# with MSVC, so we omit this optional dependency.
11001124
step_msg "targeting MSVC, disabling jemalloc"
@@ -1134,22 +1158,45 @@ do
11341158
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11351159
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
11361160
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
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"
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\""
11401184

11411185
vcvarsall="${CFG_MSVC_ROOT}/VC/vcvarsall.bat"
1142-
CFG_MSVC_INCLUDE_PATH=$(cmd /c "\"$vcvarsall\" amd64 && cmd /c echo %INCLUDE%")
1186+
include_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %INCLUDE%")
11431187
need_ok "failed to learn about MSVC's INCLUDE"
1144-
CFG_MSVC_LIB_PATH=$(cmd /c "\"$vcvarsall\" amd64 && cmd /c echo %LIB%")
1188+
lib_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %LIB%")
11451189
need_ok "failed to learn about MSVC's LIB"
11461190

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
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}
11531200
;;
11541201

11551202
*)
@@ -1388,8 +1435,19 @@ do
13881435

13891436
msg "configuring LLVM with:"
13901437
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
13911449
(cd $LLVM_BUILD_DIR && "$CFG_CMAKE" $CFG_LLVM_SRC_DIR \
1392-
-G "Visual Studio 12 2013 Win64" \
1450+
-G "$generator" \
13931451
$CMAKE_ARGS)
13941452
need_ok "LLVM cmake configure failed"
13951453
fi

trunk/mk/cfg/i686-pc-windows-msvc.mk

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# i686-pc-windows-msvc configuration
2+
CC_i686-pc-windows-msvc="$(CFG_MSVC_CL_i386)" -nologo
3+
LINK_i686-pc-windows-msvc="$(CFG_MSVC_LINK_i386)" -nologo
4+
CXX_i686-pc-windows-msvc="$(CFG_MSVC_CL_i386)" -nologo
5+
CPP_i686-pc-windows-msvc="$(CFG_MSVC_CL_i386)" -nologo
6+
AR_i686-pc-windows-msvc="$(CFG_MSVC_LIB_i386)" -nologo
7+
CFG_LIB_NAME_i686-pc-windows-msvc=$(1).dll
8+
CFG_STATIC_LIB_NAME_i686-pc-windows-msvc=$(1).lib
9+
CFG_LIB_GLOB_i686-pc-windows-msvc=$(1)-*.{dll,lib}
10+
CFG_LIB_DSYM_GLOB_i686-pc-windows-msvc=$(1)-*.dylib.dSYM
11+
CFG_JEMALLOC_CFLAGS_i686-pc-windows-msvc :=
12+
CFG_GCCISH_CFLAGS_i686-pc-windows-msvc := -MD
13+
CFG_GCCISH_CXXFLAGS_i686-pc-windows-msvc := -MD
14+
CFG_GCCISH_LINK_FLAGS_i686-pc-windows-msvc :=
15+
CFG_GCCISH_DEF_FLAG_i686-pc-windows-msvc :=
16+
CFG_LLC_FLAGS_i686-pc-windows-msvc :=
17+
CFG_INSTALL_NAME_i686-pc-windows-msvc =
18+
CFG_EXE_SUFFIX_i686-pc-windows-msvc := .exe
19+
CFG_WINDOWSY_i686-pc-windows-msvc := 1
20+
CFG_UNIXY_i686-pc-windows-msvc :=
21+
CFG_LDPATH_i686-pc-windows-msvc :=
22+
CFG_RUN_i686-pc-windows-msvc=$(2)
23+
CFG_RUN_TARG_i686-pc-windows-msvc=$(call CFG_RUN_i686-pc-windows-msvc,,$(2))
24+
CFG_GNU_TRIPLE_i686-pc-windows-msvc := i686-pc-win32
25+
26+
# All windows nightiles are currently a GNU triple, so this MSVC triple is not
27+
# bootstrapping from itself. This is relevant during stage0, and other parts of
28+
# the build system take this into account.
29+
BOOTSTRAP_FROM_i686-pc-windows-msvc := i686-pc-windows-gnu

0 commit comments

Comments
 (0)