Commit Graph

63889 Commits

Author SHA1 Message Date
Ariel Ben-Yehuda
f69c7770a9 Rollup merge of #41550 - wesleywiser:fix_33287, r=estebank
Add a regression test for ICE #33287

Fixes #33287
2017-04-26 22:11:09 +00:00
Ariel Ben-Yehuda
95c2f06162 Rollup merge of #41546 - cuviper:reduced-rust-src, r=alexcrichton
Shrink the rust-src component

Before this change, the installable rust-src component had essentially the same contents as the rustc-src dist tarball, just additionally wrapped in a rust-installer.  As discussed on [internals], rust-src is only meant to support uses for the standard library, so it doesn't really need the rest of the compiler sources.

Now rust-src only contains libstd and its path dependencies, which roughly matches the set of crates that have rust-analysis data.  The result is **significantly** smaller, from 36MB to 1.3MB compressed, and from 247MB to 8.5MB uncompressed.

[internals]: https://internals.rust-lang.org/t/minimizing-the-rust-src-component/5117
2017-04-26 22:11:08 +00:00
Ariel Ben-Yehuda
c6ff8326ec Rollup merge of #41524 - michaelwu:basic-hexagon, r=alexcrichton
Add Hexagon support

This requires an updated LLVM with https://reviews.llvm.org/D31999 and https://reviews.llvm.org/D32000 to build libcore.

A basic hello world builds and runs successfully on the hexagon simulator. libcore is fine with LLVM fixes, but libstd requires a lot more work since there's a custom rtos running on most hexagon cores. Running Linux sounds possible though, so maybe getting linux + musl going would be easier.

Here's the target file I've been using for testing
```
{
    "arch": "hexagon",
    "llvm-target": "hexagon-unknown-elf",
    "os": "none",
    "target-endian": "little",
    "target-pointer-width": "32",

    "data-layout": "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048",
    "linker": "hexagon-clang",
    "linker-flavor": "gcc",
    "executables": true,
    "cpu": "hexagonv60"
}
```
2017-04-26 22:11:07 +00:00
Ariel Ben-Yehuda
ccc790f9e6 Rollup merge of #41501 - GuillaumeGomez:invalid_module_location, r=jseyfried
Invalid module location

Fixes #38110.

r? @jseyfried
2017-04-26 22:11:06 +00:00
Ariel Ben-Yehuda
84f6e017d6 Rollup merge of #41499 - steveklabnik:gh25164, r=alexcrichton
Address platform-specific behavior in TcpStream::shutdown

Fixes #25164

r? @rust-lang/libs from the GitHub thread, it seems like documenting this behavior is okay, but I want to make sure that's what you want.
2017-04-26 22:11:05 +00:00
Ariel Ben-Yehuda
25834dcb9b Rollup merge of #41493 - scottmcm:fix-step-replace, r=sfackler
Step::replace_one should put a one, not a zero (Issue #41492)

Turns out all six of the replace_* impls were backwards.
2017-04-26 22:11:04 +00:00
Ariel Ben-Yehuda
639000ea2e Rollup merge of #41456 - jessicah:haiku-support, r=alexcrichton
Haiku: fix initial platform support
2017-04-26 22:11:03 +00:00
Ariel Ben-Yehuda
a3dde0b457 Rollup merge of #41370 - malbarbo:android-bootstrap, r=alexcrichton
Add bootstrap support for android
2017-04-26 22:11:02 +00:00
bors
612847bf71 Auto merge of #41563 - aidanhs:aphs-fix-spurious-osx-openssl-failure, r=alexcrichton
Make sure openssl compiles with only one core

This is (hopefully) a fix for the osx openssl spurious failure - #40417.

The intermittent failures and failing in different ways made me think of a race condition. But programs are parallel make safe right? [Not openssl](https://github.com/openssl/openssl/issues/298). But we don't do a parallel make on openssl [do we](8c4f2c64c6/src/bootstrap/native.rs (L309))? This confused me, except "Waiting for unfinished jobs" is present in the logs...which is evidence of a parallel make!

It turns out that when we invoke to top level target [in run.sh](036983201d/src/ci/run.sh (L75-L77)), make will [pass the flags downwards](https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html) in order to take advantage of parallelism in sub-makes. Of course, we don't want this in openssl! Override this by explicitly disabling parallelism on the command line.

I don't know why this hasn't happened on anything except OSX. Maybe Linux binutils check if the file is in use?

r? @alexcrichton
2017-04-26 21:26:14 +00:00
Amit Aryeh Levy
32b92669e4 Add RWPI/ROPI relocation model support
Adds support for using LLVM 4's ROPI and RWPI relocation models for ARM
2017-04-26 16:25:14 -04:00
Aidan Hobson Sayers
367e90775b Make sure openssl compiles with only one core
Fixes #40417
2017-04-26 21:21:27 +01:00
Josh Stone
c5cd4cb51e Add a distcheck for rust-src completeness 2017-04-26 12:37:12 -07:00
Christian Poveda
cf521211a1 restructured docs for thread and added links 2017-04-26 11:54:17 -05:00
Michael Wu
22eb3c69b9 Enable building the LLVM Hexagon target 2017-04-26 12:00:16 -04:00
bors
036983201d Auto merge of #41420 - alexcrichton:mingw-6.3.0, r=petrochenkov
appveyor: Upgrade to gcc for mingw 6.3.0

This commit sort of brings back #40777 by upgrading back to 6.3.0. While
investigating #40546 it was discovered that 6.3.0 appears to not spurious
fail in the same way that 6.2.0 does (which we're currently using). The
workaround for #40184 contained in #40777 did not work so this commit also
contains a different workaround for the gdb issue. We will not download the
6.2.0 version of gdb and use that instead of the default version that comes with
6.3.0.

I'm going to optimistically say...

Closes #40546
2017-04-26 15:12:30 +00:00
Ariel Ben-Yehuda
07b16cb508 don't allocate in get_symbol_hash 2017-04-26 17:45:02 +03:00
Ariel Ben-Yehuda
9aac5fc0f3 refactor away trans::symbol_map 2017-04-26 17:45:02 +03:00
Ariel Ben-Yehuda
a517343566 cache symbol names in ty::maps
this fixes a performance regression introduced in commit
39a58c38a0.
2017-04-26 17:45:02 +03:00
Gianni Ciccarelli
b48eb5e0be support default impl for specialization
`[default] [unsafe] impl` and typecheck
2017-04-26 14:43:09 +00:00
Michael Woerister
ab9691d5b7 Add some documentation for -Zremap-path-prefix to the unstable book 2017-04-26 16:13:16 +02:00
Alex Crichton
d1db74b63e appveyor: Upgrade to gcc for mingw 6.3.0
This commit sort of brings back #40777 by upgrading back to 6.3.0. While
investigating #40546 it was discovered that 6.3.0 appears to not spurious
fail in the same way that 6.2.0 does (which we're currently using). The
workaround for #40184 contained in #40777 did not work so this commit also
contains a different workaround for the gdb issue. We will not download the
6.2.0 version of gdb and use that instead of the default version that comes with
6.3.0.

I'm going to optimistically say...

Closes #40546
2017-04-26 06:58:50 -07:00
Michael Woerister
5c62ce4a82 Make codegen test for remap-path-prefix more thorough. 2017-04-26 15:44:02 +02:00
Michael Woerister
eb6308fc34 remap-path-prefix: Validate number of commandline arguments passed. 2017-04-26 15:44:02 +02:00
Michael Woerister
39ffea31df Implement a file-path remapping feature in support of debuginfo and reproducible builds. 2017-04-26 15:44:02 +02:00
bors
0ee56f686d Auto merge of #41352 - kennytm:macos-sanitizers, r=alexcrichton
Support AddressSanitizer and ThreadSanitizer on x86_64-apple-darwin

[ASan](https://clang.llvm.org/docs/AddressSanitizer.html#supported-platforms) and [TSan](https://clang.llvm.org/docs/ThreadSanitizer.html#supported-platforms) are supported on macOS, and this commit enables their support.

The sanitizers are always built as `*.dylib` on Apple platforms, so they cannot be statically linked into the corresponding `rustc_?san.rlib`. The dylibs are directly copied to `lib/rustlib/x86_64-apple-darwin/lib/` instead.

Note, although Xcode also ships with their own copies of ASan/TSan dylibs, we cannot use them due to version mismatch.

----

~~There is a caveat: the sanitizer libraries are linked as `@rpath/` (due to https://reviews.llvm.org/D6018), so the user needs to additionally pass `-C rpath`:~~

**Edit:** Passing rpath is now automatic.
2017-04-26 12:34:45 +00:00
bors
b0a4074c5e Auto merge of #41504 - eddyb:query-api, r=nikomatsakis
Improve the librustc on-demand/query API ergonomics.

Queries are now performed through these two forms:
* `tcx.type_of(def_id)` (the most common usage)
* `tcx.at(span).type_of(def_id)` (to provide a more specific location in the cycle stack)

Several queries were renamed to work better as method names, i.e. by suffixing with `_of`.

r? @nikomatsakis
2017-04-26 09:54:11 +00:00
steveklabnik
29e6656859 Address platform-specific behavior in TcpStream::shutdown
Fixes #25164
2017-04-26 05:30:35 -04:00
steveklabnik
7b7fe9b5c1 Clean up TcpStream example
Fixes #35950
2017-04-26 05:27:03 -04:00
bors
dad9814eb0 Auto merge of #41258 - clarcharr:str_box_extras, r=Kimundi
More methods for str boxes. (reduce Box<[u8]> ↔ Box<str> transmutes)

This is a follow-up to #41096 that adds safer methods for converting between `Box<str>` and `Box<[u8]>`. They're gated under a different feature from the `&mut str` methods because they may be too niche to include in public APIs, although having them internally helps reduce the number of transmutes the standard library uses.

What's added:

* `From<Box<str>> for Box<[u8]>`
* `<Box<str>>::into_boxed_bytes` (just calls `Into::into`)
* `alloc::str` (new module)
* `from_boxed_utf8` and `from_boxed_utf8_unchecked`, defined in `alloc:str`, exported in `collections::str`
* exports `from_utf8_mut` in `collections::str` (missed from previous PR)
2017-04-26 06:18:17 +00:00
Michael Wu
27b00ec752 Cherry pick LLVM hexagon fixes 2017-04-26 02:11:49 -04:00
Christian Poveda
bdb6bb9684 added move 2017-04-26 00:57:59 -05:00
Esteban Küber
1ca1483113 Point at variable moved by closure 2017-04-25 22:03:05 -07:00
bors
4512424391 Auto merge of #41551 - frewsxcv:rollup, r=frewsxcv
Rollup of 9 pull requests

- Successful merges: #39983, #41442, #41463, #41500, #41518, #41527, #41528, #41530, #41535
- Failed merges:
2017-04-26 03:26:12 +00:00
Jessica Hamilton
85c2ff1c46 Update num_cpus dependency to 1.x (1.4.0) 2017-04-26 15:25:03 +12:00
Corey Farwell
1fd8ba9088 Rollup merge of #41535 - steveklabnik:gh37746, r=alexcrichton
Fix up vec guarnatee around capacity

Fixes #37746

r? @rust-lang/libs
2017-04-25 23:06:01 -04:00
Corey Farwell
e2a04678da Rollup merge of #41530 - GuillaumeGomez:vec-from, r=aturon
Implement From<&mut [T]> for Vec

Fixes #41386.
2017-04-25 23:06:00 -04:00
Corey Farwell
9ae413c386 Rollup merge of #41528 - steveklabnik:gh33269, r=frewsxcv
Clarify "side effect" in peek's docs

Fixes #33269

/cc @tshepang
2017-04-25 23:05:59 -04:00
Corey Farwell
e7f1c4fd14 Rollup merge of #41527 - steveklabnik:gh41285, r=frewsxcv
Clarify the doc index

With regards to the unstable book, the reference, and the
processes involved.

Also, fix up a link by pointing to the new tracking issue rather than
the older one.

Fixes #41285

r? @frewsxcv
2017-04-25 23:05:58 -04:00
Corey Farwell
997593f16c Rollup merge of #41518 - tbu-:pr_fix_cp_error, r=sfackler
Fix a copy-paste error in `Instant::sub_duration`

Fixes #41514.
2017-04-25 23:05:58 -04:00
Corey Farwell
41933c315c Rollup merge of #41500 - steveklabnik:gh37866, r=frewsxcv
use the word 'length' in Vec::len's docs

Fixes #37866
2017-04-25 23:05:57 -04:00
Corey Farwell
5f62b2716f Rollup merge of #41463 - SergioBenitez:master, r=alexcrichton
Add internal accessor methods to io::{Chain, Take}.

Resolves #29067.
2017-04-25 23:05:56 -04:00
Corey Farwell
2a320c32ed Rollup merge of #41442 - tbu-:pr_writeall_interrupted, r=aturon
Specify behavior of `write_all` for `ErrorKind::Interrupted` errors

Also spell out that read and write operations should be retried on
`ErrorKind::Interrupted` errors.

Fixes #38494.
2017-04-25 23:05:55 -04:00
Corey Farwell
27fbe8cbca Rollup merge of #39983 - AndrewGaspar:rust-windbg, r=brson
Adds rust-windbg.cmd script

Adds rust-gdb/rust-lldb equivalent for windbg that loads the Rust .natvis files on start.

This change modifies the bootstrap code to add rust-windbg to bin and the .natvis files to lib/rustlib/etc.

Example usage from cmd or PowerShell:
```
rust-windbg -c "bu rs_f442289d74765418!rs::main;g" target\debug\rs.exe
```
2017-04-25 23:05:54 -04:00
Michael Wu
32aeb22f54 Avoid the hexagon backend on old versions of LLVM 2017-04-25 22:59:31 -04:00
Wesley Wiser
9f96d0a7b8 Add a regression test for ICE #33287
Fixes #33287
2017-04-25 22:57:04 -04:00
alexey zabelin
5312f0c329
Fix tidy check errors
This adjusts several lines to be shorter than 100 characters.
2017-04-25 22:22:42 -04:00
Esteban Küber
b10e2933d9 Move cfail tests to ui 2017-04-25 17:17:12 -07:00
bors
7e7114fe2e Auto merge of #41332 - petrochenkov:privti, r=eddyb
Check privacy of trait items in all contexts

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

This is a sufficiently rare scenario and it's currently guarded by `private_in_public` lint, so it shouldn't be a [breaking-change] in practice.
2017-04-25 23:46:37 +00:00
Josh Stone
b9bdb1766d Reduce the contents of the rust-src component 2017-04-25 16:13:46 -07:00
Josh Stone
7248f67f1b Build the rustc-src tarball before the rust-src component 2017-04-25 16:13:45 -07:00