Commit Graph

59516 Commits

Author SHA1 Message Date
Jeffrey Seyfried
532b013b28 Rename ModuleS -> ModuleData. 2016-12-18 23:26:27 +00:00
Jeffrey Seyfried
aa19274b72 De-genericize try_define. 2016-12-18 23:26:26 +00:00
Jeffrey Seyfried
59de7f8f04 Add ident.unhygienize() and use Ident more instead of Name in resolve. 2016-12-18 23:26:22 +00:00
Jeffrey Seyfried
83ab9f7fac Remove some unused functions and fix formatting. 2016-12-18 23:25:30 +00:00
Jeffrey Seyfried
b35c306b65 Fix the path resolutions of glob imports. 2016-12-18 23:23:23 +00: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
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
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
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
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
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
bors
c6d8ab09e3 Auto merge of #38357 - arielb1:deterministic-hash, r=michaelwoerister
make deterministic_hash host-architecture-independent

`DefPath::deterministic_hash` used to call `std:#️⃣:Hash`, which depends on the current architecture in several ways, which would prevent metadata written on one host architecture from being successfully read on another one.

Use a hasher we control instead.

Fixes #38177.

r? @michaelwoerister
2016-12-16 03:56:47 +00:00
bors
8ae904062b Auto merge of #38352 - bluss:unaligned-metadata, r=eddyb
Fix unaligned loads in librustc_metadata

Creating a `&[u32]` from an `&[u8]` is not necessarily valid, and crashes
on certain platforms if the data is not well aligned.
2016-12-16 00:52:35 +00:00
bors
8f02c429ad Auto merge of #38394 - alexcrichton:fix-nightlies, r=brson
rustbuild: Package rust-mingw by default

This fixes the `make dist` step on MinGW to package the `rust-mingw` component
by default. This should hopefully be the last step in fixing nightlies.
2016-12-15 19:43:28 +00:00
Aaron Turon
fce6af2a67 Stabilize std::io::Take::into_inner 2016-12-15 10:56:56 -08:00
Aaron Turon
dc2d5058e9 Deprecate std::cell::RefCell::borrow_state 2016-12-15 10:56:55 -08:00
Aaron Turon
b2882709b3 Stabilize std::cell::Ref::clone 2016-12-15 10:56:55 -08:00
Aaron Turon
415f3de7aa Stabilize std::char::{encode_utf8, encode_utf16} 2016-12-15 10:56:55 -08:00
Aaron Turon
b02ed1e1d4 Stabilize:
- `std::rc::Rc::{strong_count, weak_count}`
- `std::sync::Arc::{strong_count, weak_count}`

Deprecate:

- `std::rc::Rc::{would_unwrap, is_unique}`
2016-12-15 10:56:55 -08:00
Aaron Turon
65b144c964 Stabilize std::os::unix::process::CommandExt::before_exec 2016-12-15 10:56:55 -08:00
Aaron Turon
9e8fd24383 Stabilize std::sync::mpsc::Receiver::try_iter 2016-12-15 10:56:55 -08:00
Aaron Turon
3188ed50cf Stabilize std::vec::IntoIter::{as_slice, as_mut_slice} 2016-12-15 10:56:55 -08:00
Aaron Turon
e5363881a9 Stabilize std::sync::atomic::Atomic*::{get_mut, into_inner} 2016-12-15 10:56:55 -08:00
Aaron Turon
df26a5a958 Stabilize std::os::*::fs::FileExt 2016-12-15 10:56:55 -08:00
Aaron Turon
95373cd5d8 Stabilize Iterator::{min_by, max_by} 2016-12-15 10:56:55 -08:00
Ariel Ben-Yehuda
e1d4b8fc8c Use StableHasher everywhere
The standard implementations of Hasher have architecture-dependent
results when hashing integers. This causes problems when the hashes are
stored within metadata - metadata written by one host architecture can't
be read by another.

To fix that, implement an architecture-independent StableHasher and use
it in all places an architecture-independent hasher is needed.

Fixes #38177.
2016-12-15 20:48:59 +02:00
Alex Crichton
67ae4ab5c2 rustbuild: Package rust-mingw by default
This fixes the `make dist` step on MinGW to package the `rust-mingw` component
by default. This should hopefully be the last step in fixing nightlies.
2016-12-15 10:05:41 -08:00
bors
f70ad0adfd Auto merge of #38331 - bluss:assume-stage, r=alexcrichton
rustbuild: Add cli option --keep-stage

This option is intended to be used like:

./x.py build --stage 1 --keep-stage 0

Which skips all stage 0 steps, so that stage 1 can be recompiled
directly (even if for example libcore has changes).

This is useful when working on `cfg(not(stage0))` parts of the
libraries or when re-running stage 1 tests in libraries in general.

Fixes #38326
2016-12-15 14:01:55 +00:00
bors
833b03ad52 Auto merge of #38185 - jsgf:test-list, r=alexcrichton
libtest: add --list option to list tests and benchmarks

This option lists all the tests and benchmarks a binary provides without running any of them.
By default the listing is sent to stdout (intended for human consumption), but if `--logfile` is also specified, it is also written there in an easily parsable form.

If filters are specified, they're applied before the output is emitted. The human output will also include a summary unless `-q` is specified.
2016-12-15 09:26:25 +00:00
bors
cfa668f3bf Auto merge of #37702 - redox-os:redox, r=brson
Redox Support Preview

# Important - This is only a preview of a working `sys::redox`.

Compiling the Redox default distribution with this `libstd` results in a fully functioning distribution. As such, all further changes would be cosmetic or implementing features that have not been used by the default distribution (of which there are only a small number).

I do not expect this to be merged, but would like to discuss how it may be improved and get feedback.

There are a few `unimplemented!()` - `cloexec` for example. I have documented them below. These would be resolved before desiring a merge.

There are also issues with how the Redox syscall library is called - currently I am using a re-export in `libc` but that probably would not be desired.
2016-12-15 06:23:11 +00:00
bors
7ad7232422 Auto merge of #38375 - petrochenkov:prim, r=eddyb
Fix regression in resolution of primitive types

Fix often encountered ICE.
Extracted from https://github.com/rust-lang/rust/pull/38154
Fixes https://github.com/rust-lang/rust/issues/38155, fixes https://github.com/rust-lang/rust/issues/38188, fixes https://github.com/rust-lang/rust/issues/38277, fixes https://github.com/rust-lang/rust/issues/38280, fixes https://github.com/rust-lang/rust/issues/38292, fixes https://github.com/rust-lang/rust/issues/38311, fixes https://github.com/rust-lang/rust/issues/38344, fixes https://github.com/rust-lang/rust/issues/38363, fixes https://github.com/rust-lang/rust/issues/38372 (duplicates)

r? @jseyfried or @eddyb or @nrc
2016-12-15 02:39:34 +00:00
Ulrik Sverdrup
0e01427bba rustbuild: Add small description of --keep-stage 2016-12-15 01:19:17 +01:00
Alex Crichton
96a5fc76dc 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.
2016-12-14 15:40:18 -08:00
bors
52e024f2d1 Auto merge of #38374 - alexcrichton:makefile-fix, r=brson
mk: Fix `make check`

When the rustc-unicode crate was renamed to std-unicode we just need to continue
to filter it out of the crates being tested.
2016-12-14 23:37:21 +00:00
Vadim Petrochenkov
0157e6c058 Fix regression in resolution of primitive types 2016-12-15 02:12:08 +03:00
Alex Crichton
769c5579c9 mk: Fix make check
When the rustc-unicode crate was renamed to std-unicode we just need to continue
to filter it out of the crates being tested.
2016-12-14 15:05:20 -08:00
bors
0d558d012a Auto merge of #38367 - alexcrichton:fix-nightiles, r=brson
rustbuild: Run `dist` on a `distcheck`

This is what the nightly bots expect, so let's be sure to do that.
2016-12-14 20:35:10 +00:00
Alex Crichton
c7f4cdcabc rustbuild: Run dist on a distcheck
This is what the nightly bots expect, so let's be sure to do that.
2016-12-14 11:03:22 -08:00