Commit Graph

59548 Commits

Author SHA1 Message Date
Alex Crichton
f5e7d92129 rustbuild: Update Cargo download location
I updated the beta compiler used to bootstrap the master branch in #38438 with
the intention of fixing Travis OSX linkage issues but I mistakenly forgot that
the PR only updated rustc, not Cargo itself. Cargo has a new release process
with downloads in a different location, so this commit updates rustbuild to
download from this new location by tracking revisions instead of Cargo nightly
dates.
2016-12-19 17:16:13 -08:00
bors
94ae2a2e67 Auto merge of #38072 - nikomatsakis:bootstrap-incremental, r=acrichto
add preliminary support for incremental compilation to rustbuild.py

This implements the integration described in #37929. It requires the use of a local nightly as your bootstrap compiler. The setup is described in `src/bootstrap/README.md`.

This does NOT implement the "copy stage0 libs to stage1" optimization described in #37929, just because that seems orthogonal to me.

In local testing, I do not yet see any incremental re-use when building rustc. I'm not sure why that is, more investigation needed.

(For these reasons, this is not marked as fixing the relevant issue.)

r? @alexcrichton -- I included one random cleanup (`Step::noop()`) that turned out to not be especially relevant. Feel free to tell me you liked it better the old way.
2016-12-19 20:07:49 +00:00
Niko Matsakis
83453bc673 add and document --incremental flag along with misc other changes
For example:

- we now support `-vv` to get very verbose output.
- RUSTFLAGS is respected by `x.py`
- better error messages for some cases
2016-12-19 11:46:38 -05:00
Niko Matsakis
ef8921add6 add concept of Step::noop() 2016-12-19 11:46:03 -05:00
bors
3f9823d5f5 Auto merge of #38405 - alexcrichton:rustbuild-fixes, r=japaric
rustbuild: Fix `copy` helper with existing files

This erroneously truncated files when the destination already existed and was an
existing hard link to the source. This in turn caused weird bugs!

Closes #37745
2016-12-19 15:36:15 +00:00
bors
10271ea24f Auto merge of #38466 - sanxiyn:rollup, r=sanxiyn
Rollup of 9 pull requests

- Successful merges: #38334, #38397, #38413, #38421, #38422, #38433, #38438, #38445, #38459
- Failed merges:
2016-12-19 12:17:24 +00:00
Seo Sanghyeon
05be48b18b Rollup merge of #38459 - nagisa:rustbuild-exec, r=alexcrichton
Use exec for the wrapper on UNIXes

This not only avoids the small – and unnecessary – constant overhead for each compiler invocation,
but also helps somewhat by only having “correct” rustc processes to look for in `/proc/`.

This also makes the wrapper behave effectively as a regular exec wrapper its intended to be.

I also took liberty to change the fallback error code from `1` to `0xfe` (now only relevant on windows) so that when people complain about “compiler exited with code 254”, its obvious where the issue lies (wrapper losing the exit code somehow).

r? @alexcrichton
2016-12-19 16:59:44 +09:00
Seo Sanghyeon
fda41c6b5c Rollup merge of #38445 - est31:master, r=apasel422
stage0.txt: typo fix
2016-12-19 16:59:44 +09:00
Seo Sanghyeon
9f18f25464 Rollup merge of #38438 - alexcrichton:update-beta, r=brson
Update beta bootstrap compiler

The current beta that rustc is bootstrapping from contains a bug in Cargo that
erroneously links to OpenSSL in /usr/local, but this is fixed in the most recent
1.14 beta, so let's use that.
2016-12-19 16:59:43 +09:00
Seo Sanghyeon
49cd809e7a Rollup merge of #38433 - GuillaumeGomez:thread_docs, r=frewsxcv
Thread docs

r? @frewscvx
2016-12-19 16:59:41 +09:00
Seo Sanghyeon
813af34c92 Rollup merge of #38422 - zackmdavis:enjoy_tidy_path_error_macro_nicety, r=bluss
tidy features: use 2-parameter form of internal try macro for open err

This tiny patch merely applies @bluss's suggestion for how to get a more
informative error message when the feature check can't open a file, a
matter that had briefly annoyed the present author, leading to the
filing of #38417.

Resolves #38417.
2016-12-19 16:59:40 +09:00
Seo Sanghyeon
4b5cffc04b Rollup merge of #38421 - apasel422:issue-36934, r=alexcrichton
Replace invalid use of `&mut` with `UnsafeCell` in `std::sync::mpsc`

Closes #36934

r? @alexcrichton
2016-12-19 16:59:38 +09:00
Seo Sanghyeon
d38beccdc4 Rollup merge of #38413 - rillian:armv7-neon, r=alexcrichton
rustc: Disable NEON on armv7 android.

We thought Google's ABI for arvm7 required neon, but it is
currently optional, perhaps because there is a significant
population of Tegra 2 devices still in use.

This turns off neon code generation outside #[target-feature]
blocks just like we do on armv7-unknown-linux-gnu, but unlike
most other armv7 targets. LLVM defaults to +neon for this target,
so an explicit disable is necessary.

See https://developer.android.com/ndk/guides/abis.html#v7a
for instruction set extension requirements.

Closes #38402.
2016-12-19 16:59:37 +09:00
Seo Sanghyeon
0c4e1db935 Rollup merge of #38397 - frewsxcv:platform-specific-process-exit, r=alexcrichton
Document platform-specific differences for `std::process::exit`.

Fixes https://github.com/rust-lang/rust/issues/35046.
2016-12-19 16:59:36 +09:00
Seo Sanghyeon
86cf9222e9 Rollup merge of #38334 - frewsxcv:BuildHasherDefault, r=GuillaumeGomez
Rewrite, improve documentation for `core:#️⃣:BuildHasherDefault`.

Fixes https://github.com/rust-lang/rust/issues/31242.
2016-12-19 16:59:35 +09:00
bors
e70415bd71 Auto merge of #38411 - japaric:gh38406, r=alexcrichton
llvm: backport r280651

fixes #38406

r? @alexcrichton

(I'm secretly hoping this will error in the same way as #38314. That would sort of confirm that the problem is OOM and not enabling the SPARC backend)
2016-12-19 07:52:42 +00:00
bors
cc662efca1 Auto merge of #38194 - sgrif:sg-no-span-mangling, r=nrc
Don't perform span mangling when building field/tup access nodes

There are no guarantees that the two spans used to create the new one
come from the same place or are even valid.

Fixes #36081.
2016-12-19 04:39:18 +00:00
bors
0102127963 Auto merge of #38140 - jseyfried:proc_macro_visibility, r=nrc
Require `#[proc_macro_derive]` functions to be `pub`

r? @nrc
2016-12-19 01:23:32 +00:00
bors
71c06a56a1 Auto merge of #38051 - sanxiyn:unused-type-alias-3, r=eddyb
Warn unused type aliases, reimplemented

Reimplementation of #37631. Fix #37455.
2016-12-18 22:06:34 +00:00
Simonas Kazlauskas
b3b2f1b0d6 Use exec for the wrapper on UNIXes
This not only avoids the small – and unnecessary – constant overhead for each compiler invocation,
but also helps somewhat by only having “correct” rustc processes to look for in `/proc/`.

This also makes the wrapper behave effectively as a regular exec wrapper its intended to be.
2016-12-18 23:56:50 +02:00
Corey Farwell
4d392d355e Document platform-specific differences for std::process::exit.
Fixes https://github.com/rust-lang/rust/issues/35046.
2016-12-18 09:47:22 -08:00
bors
1f965cc8e9 Auto merge of #38369 - aturon:stab-1.15, r=alexcrichton
Library stabilizations/deprecations for 1.15 release

Stabilized:

- `std::iter::Iterator::{min_by, max_by}`
- `std::os::*::fs::FileExt`
- `std::sync::atomic::Atomic*::{get_mut, into_inner}`
- `std::vec::IntoIter::{as_slice, as_mut_slice}`
- `std::sync::mpsc::Receiver::try_iter`
- `std::os::unix::process::CommandExt::before_exec`
- `std::rc::Rc::{strong_count, weak_count}`
- `std::sync::Arc::{strong_count, weak_count}`
- `std::char::{encode_utf8, encode_utf16}`
- `std::cell::Ref::clone`
- `std::io::Take::into_inner`

Deprecated:

- `std::rc::Rc::{would_unwrap, is_unique}`
- `std::cell::RefCell::borrow_state`

Closes #23755
Closes #27733
Closes #27746
Closes #27784
Closes #28356
Closes #31398
Closes #34931
Closes #35601
Closes #35603
Closes #35918
Closes #36105
2016-12-18 17:37:25 +00:00
Seo Sanghyeon
f71f31aa61 Update commit hash in cargotest 2016-12-18 23:15:53 +09:00
Seo Sanghyeon
5a1b62c0fd Fix Windows 2016-12-18 22:19:57 +09:00
Guillaume Gomez
79e8a70b62 Add missing urls for thread doc module 2016-12-18 11:36:13 +01:00
bors
8327b5afaf Auto merge of #37429 - camlorn:univariant_layout_optimization, r=eddyb
struct field reordering and optimization

This is work in progress.  The goal is to divorce the order of fields in source code from the order of fields in the LLVM IR, then optimize structs (and tuples/enum variants)by always ordering fields from least to most aligned.  It does not work yet.  I intend to check compiler memory usage as a benchmark, and a crater run will probably be required.

I don't know enough of the compiler to complete this work unaided.  If you see places that still need updating, please mention them.  The only one I know of currently is debuginfo, which I'm putting off intentionally until a bit later.

r? @eddyb
2016-12-18 07:59:32 +00:00
bors
d54e723179 Auto merge of #38440 - alexcrichton:fix-osx-nightlies, r=brson
rustbuild: Fix LC_ID_DYLIB directives on OSX

Currently libraries installed by rustbuild on OSX have an incorrect
`LC_ID_DYLIB` directive located in the dynamic libraries that are
installed. The directive we expect looks like:

    @rpath/libstd.dylib

Which means that if you want to find that dynamic library you should
look at the dylib's other `@rpath` directives. Typically our `@rpath`
directives look like `@loader_path/../lib` for the compiler as that's
where the installed libraries will be located. Currently, though,
rustbuild produces dylibs with the directive that looks like:

    /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libstd-713ad88203512705.dylib

In other words, the build directory is encoded erroneously. The compiler
already [knows how] to change this directive, but it only passes that
argument when `-C rpath` is also passed. The rustbuild system, however,
explicitly [does not pass] this option explicitly and instead bakes its
own. This logic then also erroneously didn't pass `-Wl,-install_name`
like the compiler.

[knows how]: 4a008cccaa/src/librustc_trans/back/linker.rs (L210-L214)
[does not pass]: 4a008cccaa/src/bootstrap/bin/rustc.rs (L133-L158)

To fix this regression this patch introduces a new `-Z` flag, `-Z
osx-rpath-install-name` which basically just forces the compiler to take
the previous `-install_name` branch when creating a dynamic library.
Hopefully we can sort out a better rpath story in the future, but for
now this "hack" should suffice in getting our nightly builds back to the
same state as before.

Closes #38430
2016-12-18 04:38:27 +00:00
est31
1e7bc90708 stage0.txt: typo fix 2016-12-18 03:12:18 +01:00
bors
32d02bbafa Auto merge of #38439 - alexcrichton:fix-nightlies, r=brson
rustbuild: Create directories in mingw dist

Previously we accidentally relied on the mingw dist step running last, but the
step just needed to ensure the directories were created.
2016-12-18 01:07:35 +00:00
Alex Crichton
1b8e6c152c rustbuild: Fix LC_ID_DYLIB directives on OSX
Currently libraries installed by rustbuild on OSX have an incorrect
`LC_ID_DYLIB` directive located in the dynamic libraries that are
installed. The directive we expect looks like:

    @rpath/libstd.dylib

Which means that if you want to find that dynamic library you should
look at the dylib's other `@rpath` directives. Typically our `@rpath`
directives look like `@loader_path/../lib` for the compiler as that's
where the installed libraries will be located. Currently, though,
rustbuild produces dylibs with the directive that looks like:

    /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libstd-713ad88203512705.dylib

In other words, the build directory is encoded erroneously. The compiler
already [knows how] to change this directive, but it only passes that
argument when `-C rpath` is also passed. The rustbuild system, however,
explicitly [does not pass] this option explicitly and instead bakes its
own. This logic then also erroneously didn't pass `-Wl,-install_name`
like the compiler.

[knows how]: 4a008cccaa/src/librustc_trans/back/linker.rs (L210-L214)
[does not pass]: 4a008cccaa/src/bootstrap/bin/rustc.rs (L133-L158)

To fix this regression this patch introduces a new `-Z` flag, `-Z
osx-rpath-install-name` which basically just forces the compiler to take
the previous `-install_name` branch when creating a dynamic library.
Hopefully we can sort out a better rpath story in the future, but for
now this "hack" should suffice in getting our nightly builds back to the
same state as before.

Closes #38430
2016-12-17 16:14:11 -08:00
Alex Crichton
bc06bbb401 rustbuild: Create directories in mingw dist
Previously we accidentally relied on the mingw dist step running last, but the
step just needed to ensure the directories were created.
2016-12-17 13:51:51 -08:00
bors
ec8bb45624 Auto merge of #38279 - KalitaAlexey:issue-8521, r=jseyfried
macros: allow a `path` fragment to be parsed as a type parameter bound

Allow a `path` fragment to be parsed as a type parameter bound.
Fixes #8521.
2016-12-17 21:49:51 +00:00
Alex Crichton
c3423a6640 Update beta bootstrap compiler
The current beta that rustc is bootstrapping from contains a bug in Cargo that
erroneously links to OpenSSL in /usr/local, but this is fixed in the most recent
1.14 beta, so let's use that.
2016-12-17 13:47:31 -08:00
bors
4a008cccaa Auto merge of #38122 - brson:book-rustup, r=steveklabnik
Update book for rustup

Supersedes https://github.com/rust-lang/rust/pull/37934

Don't land yet. Needs coordination with https://github.com/rust-lang/rust-www/pull/621

Fixes https://github.com/rust-lang/rust/issues/35653

r? @steveklabnik
2016-12-17 17:25:30 +00:00
bors
dea7ef3424 Auto merge of #38419 - alexcrichton:travis-osx-32-bit, r=brson
travis: Fix testing 32-bit OSX target

We passed --target when we meant to pass --build, meaning we tested only the
standard library for 32-bit, not the whole compiler like we intended.
2016-12-17 11:10:11 +00:00
bors
f99d4dfef2 Auto merge of #38205 - jseyfried:fix_module_directory_regression, r=eddyb
macros: fix the expected paths for a non-inline module matched by an `item` fragment

Fixes #38190.
r? @nrc
2016-12-17 06:43:16 +00:00
Aaron Turon
9a5cef4de5 Address fallout 2016-12-16 19:42:17 -08:00
Zack M. Davis
ca376049ca tidy features: use 2-parameter form of internal try macro for open err
This tiny patch merely applies @bluss's suggestion for how to get a more
informative error message when the feature check can't open a file, a
matter that had briefly annoyed the present author, leading to the
filing of #38417.
2016-12-16 17:45:59 -08:00
Andrew Paseltiner
26d4308c6a
Replace invalid use of &mut with UnsafeCell in std::sync::mpsc
Closes #36934
2016-12-16 19:52:12 -05:00
Alex Crichton
0f742e600b travis: Fix testing 32-bit OSX target
We passed --target when we meant to pass --build, meaning we tested only the
standard library for 32-bit, not the whole compiler like we intended.
2016-12-16 16:32:40 -08:00
Brian Anderson
7550e32146 Update book for rustup 2016-12-16 21:18:44 +00:00
Steve Klabnik
38cb687075 Book: rustup.sh -> rustup.rs
Fixes #35653

cc https://github.com/rust-lang/rust-www/pull/621
2016-12-16 21:18:43 +00:00
Austin Hicks
ff59474ed3 flock needs repr(C) 2016-12-16 15:50:14 -05:00
Ralph Giles
9e01f76349 rustc: Link to Android ABI requirements.
Hopefully these references will be stable and provide guidance
when requirements change in the future.
2016-12-16 11:27:12 -08:00
Ralph Giles
e900f6c7fe rustc: Disable NEON on armv7 android.
We thought Google's ABI for arvm7 required neon, but it is
currently optional, perhaps because there is a significant
population of Tegra 2 devices still in use.

This turns off neon code generation outside #[target-feature]
blocks just like we do on armv7-unknown-linux-gnu, but unlike
most other armv7 targets. LLVM defaults to +neon for this target,
so an explicit disable is necessary.

See https://developer.android.com/ndk/guides/abis.html#v7a
for instruction set extension requirements.

Closes #38402.
2016-12-16 10:54:48 -08:00
Jorge Aparicio
9350016d7d llvm: backport r280651
fixes #38406
2016-12-16 12:49:58 -05:00
Corey Farwell
d409fc378c Rewrite, improve documentation for core:#️⃣:BuildHasherDefault.
Fixes https://github.com/rust-lang/rust/issues/31242.
2016-12-16 12:27:03 -05:00
Austin Hicks
f22a22b286 Incorporate review comments. 2016-12-16 12:06:12 -05:00
Kalita Alexey
12a6cf1123 Allow path fragments to be parsed as type parameter bounds in macro expansion 2016-12-16 14:16:46 +03:00
bors
d250169cb5 Auto merge of #38359 - alexcrichton:sccache, r=brson
rustbuild: Add sccache support

This commit adds support for sccache, a ccache-like compiler which works on MSVC
and stores results into an S3 bucket. This also switches over all Travis and
AppVeyor automation to using sccache to ensure a shared and unified cache over
time which can be shared across builders.

The support for sccache manifests as a new `--enable-sccache` option which
instructs us to configure LLVM differently to use a 'sccache' binary instead of
a 'ccache' binary. All docker images for Travis builds are updated to download
Mozilla's tooltool builds of sccache onto various containers and systems.
Additionally a new `rust-lang-ci-sccache` bucket is configured to hold all of
our ccache goodies.

---

Note that this does not currently change Windows [due to previously written up issues](https://github.com/rust-lang/rust/issues/38119#issuecomment-266631585). Despite that, however, I was curious to get timings for the builds on Travis to see what ranges we're working with. As a result, this is a WIP PR I'm using to gauge build times and such.
2016-12-16 07:26:41 +00:00