Commit Graph

59556 Commits

Author SHA1 Message Date
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
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
Alex Crichton
a5193057b9 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-15 19:48:33 -08: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
Seo Sanghyeon
75cd69cf95 Warn unused type aliases 2016-12-15 18:35:20 +09:00
Seo Sanghyeon
a75909824a Remove now unnecessary code
This code was introduced in #27565 to mark types in paths alive. It is now unnecessary since #37676.
2016-12-15 18:35:20 +09: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
Jeffrey Seyfried
16052546f7 Require #[proc_macro_derive] functions to be pub. 2016-12-15 03:02:32 +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
Jeremy Fitzhardinge
516d105c0b libtest: add --list option to list tests and benchmarks
This option lists all the tests and benchmarks a binary provides. By default the listing
is sent to stdout, but if --logfile is also specified, it is written there.

If filters are specified, they're applied before the output is emitted.
2016-12-14 10:15:36 -08:00
bors
b197e4a45f Auto merge of #38295 - dylanmckay:llvm-4.0-di-globalvar, r=michaelwoerister
[LLVM 4.0] Update LLVM global variable debug info API for 4.0

This teaches Rust about an LLVM 4.0 API change for creating debug info
for global variables.

This change was made in upstream LLVM patch https://reviews.llvm.org/D20147

This is almost a 1:1 copy of how clang did it in http://reviews.llvm.org/D20415
2016-12-14 17:36:01 +00:00
Austin Hicks
79c35bbd8c Add a case to type-sizes to explicitly verify that field reordering triggers. 2016-12-14 12:28:26 -05:00
Austin Hicks
9966bbd1b1 Fix computation of enum names based off the discrfield in the case of the null pointer optimization. This functionality is needed by pretty printers for gdb and lldb. 2016-12-14 12:28:26 -05:00
Austin Hicks
a65cc1ea54 Fix error introduced during last rebase 2016-12-14 12:28:25 -05:00
Austin Hicks
cfe1a776ee Fix -Z print-type-sizes and tests.
This was done by sorting the fields by increasing offset; as a consequence, the order of -Z print-type-sizes matches memory order not source order.
2016-12-14 12:28:25 -05:00
Austin Hicks
025456e8a4 Incorporate review comments 2016-12-14 12:28:25 -05:00
Austin Hicks
e9580e262b Some small fixes to how structs/enums are optimized 2016-12-14 12:28:24 -05:00
Austin Hicks
052e59cc12 Make tidy 2016-12-14 12:28:24 -05:00
Austin Hicks
c8c3579bff Fix closure arguments which are immediate because of field reordering.
While building immediates goes through type_of::type_of, extracting them must account for field reorderings.
2016-12-14 12:28:24 -05:00
Austin Hicks
cf5f80c68d Fix having multiple reprs on the same type.
This bug has applied to master for an indefinite period of time and is orthogonal to univariant layout optimization.
2016-12-14 12:28:24 -05:00