Commit Graph

120726 Commits

Author SHA1 Message Date
Gary Guo
a05acbf36f Comment flock usage on Linux 2020-05-21 01:10:52 +01:00
Josh Stone
9c97b3cbf1 Move the target libLLVM to llvm-tools-preview
For running the compiler, we usually only need LLVM from `$sysroot/lib`,
which rustup will make available with `LD_LIBRARY_PATH`. We've also been
shipping LLVM in the `$target/lib` directory, which bloats the download
and installed size. The only times we do need the latter are for the
RPATH of `llvm-tools-preview` binaries, and for linking `rustc-dev`
libraries. We'll move it to the `llvm-tools-preview` component directly,
and `rustc-dev` will have an implicit dependency on it.

Here are the dist sizes that I got before and after this change:

    llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz     1.3M   24M
    llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz     748K   17M
    rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz          83M    61M
    rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz          56M    41M

The installed size should reduce by exactly one `libLLVM.so` (~70-80M),
unless you also install `llvm-tools`, and then it should be identical.
2020-05-20 16:28:28 -07:00
bors
82911b3bba Auto merge of #67759 - nikic:llvm-10, r=Mark-Simulacrum
Update to LLVM 10

LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;)

Status:

 * Preparation split off into #67900.
 * Optimization regressions:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed.
   * [x] https://reviews.llvm.org/D72169 submitted.
   * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 submitted, but unlikely eligible for LLVM 10.
 * Compile-time regressions:
   * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](192cce10f6) the patch.
   * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14).
 * Assertion failures / infinite loops:
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44600 => https://reviews.llvm.org/D73135, https://reviews.llvm.org/D73854 and https://reviews.llvm.org/D73908 have landed and been cherry-picked to the 10.x branch.
   * [x] https://bugs.llvm.org/show_bug.cgi?id=44835 => https://reviews.llvm.org/D74278 has landed and been cherry-picked.
2020-05-20 22:49:57 +00:00
Dylan MacKenzie
09619bc459 Add regression test for #72394 2020-05-20 14:55:38 -07:00
Dylan MacKenzie
119efbcbfb Use is_const_fn_raw when unsafety checking 2020-05-20 14:55:07 -07:00
Nathan West
dc3de7cb2a Add fast-path optimization for Ipv4Addr::fmt 2020-05-20 16:49:31 -04:00
Vadim Petrochenkov
c7813ff7d2 llvm: Expose tiny code model to users 2020-05-20 23:10:48 +03:00
Aaron Hill
633293fc3a
Fix tests 2020-05-20 15:33:58 -04:00
bors
0aa6751c19 Auto merge of #72378 - Dylan-DPC:rollup-m87bp2d, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #71863 (Suggest fixes and add error recovery for `use foo::self`)
 - #72139 (Make `fold` standalone.)
 - #72275 (Continue lowering for unsupported async generator instead of returning an error.)
 - #72361 (split_inclusive: add tracking issue number (72360))
 - #72364 (Remove unused dependencies)
 - #72366 (Adjust the zero check in `RawVec::grow`.)

Failed merges:

r? @ghost
2020-05-20 19:29:01 +00:00
Vadim Petrochenkov
8dbe4d9ba4 Eliminate some Option<NativeLibKind>s 2020-05-20 21:57:16 +03:00
Vadim Petrochenkov
529d488f1a Factor out NativeLibKind::Dylib from NativeLibKind::Unspecified 2020-05-20 21:57:13 +03:00
Vadim Petrochenkov
ee7a35ab95 Rename some types describing native libraries
NativeLibrary(Kind) -> NativeLib(Kind)
NativeStatic -> StaticBundle
NativeStaticNobundle -> StaticNoBundle
NativeFramework -> Framework
NativeRawDylib -> RawDylib
NativeUnknown -> Unspecified
2020-05-20 21:53:19 +03:00
Vadim Petrochenkov
ed1297c92a rustc_target: Avoid an inappropriate use of post_link_objects 2020-05-20 21:33:37 +03:00
Nikita Popov
b2bf0cdecb Set CMAKE_CXX_STANDARD when compiling LLD 2020-05-20 20:14:16 +02:00
Nikita Popov
9f128235b4 Update LLVM submodule 2020-05-20 20:14:16 +02:00
bors
8858a435f3 Auto merge of #72384 - mati865:ci-fix, r=pietroalbini
Workaround MSYS2/chocolatey issue again
2020-05-20 15:55:59 +00:00
Mateusz Mikuła
2d4d0dbaa7 Workaround MSYS2/chocolatey issue again 2020-05-20 17:40:58 +02:00
Tomasz Miąsko
6778c7a7c1 Show default values for debug-assertions & debug-assertions-std 2020-05-20 16:48:45 +02:00
Chris Denton
2fd504ce2f Suggest installing VS Build Tools in more situations
When MSVC's `link.exe` wasn't found but another `link.exe` was, the error message given can be impenetrable to many users. The usual suspect is GNU's `link` tool. In this case, inform the user that they may need to install VS build tools.

This only applies when Microsoft's link tool is expected. Not `lld-link` or other MSVC compatible linkers.
2020-05-20 15:04:11 +01:00
Bastian Kauschke
3dd830b70c ptr eq for Predicate 2020-05-20 15:44:34 +02:00
Bastian Kauschke
6544d7b6b1 change Predicate::kind to return a reference 2020-05-20 15:44:34 +02:00
Bastian Kauschke
57746f943b intern PredicateKind 2020-05-20 15:44:34 +02:00
Bastian Kauschke
f3164790bd introduce newtype'd Predicate<'tcx> 2020-05-20 15:44:34 +02:00
Niko Matsakis
034c25f33e make to_predicate take a tcx argument 2020-05-20 15:44:34 +02:00
Bastian Kauschke
cad8fe90fd rename Predicate to PredicateKind, introduce alias 2020-05-20 15:38:03 +02:00
Dylan DPC
51f80b7630
Rollup merge of #72366 - nnethercote:tiny-vecs-are-dumb-followup, r=Amanieu
Adjust the zero check in `RawVec::grow`.

This was supposed to land as part of #72227. (I wish `git push` would
abort when you have uncommited changes.)

r? @Amanieu
2020-05-20 14:21:13 +02:00
Dylan DPC
c93ddbf811
Rollup merge of #72364 - jsgf:remove-unused-deps, r=Mark-Simulacrum
Remove unused dependencies

Remove some unused dependencies found while while working on https://github.com/rust-lang/rust/pull/72342.
2020-05-20 14:21:11 +02:00
Dylan DPC
2bfbc057fe
Rollup merge of #72361 - golddranks:split_inclusive_add_tracking_issue, r=shepmaster
split_inclusive: add tracking issue number (72360)

Adds tracking issue number ( https://github.com/rust-lang/rust/issues/72360 ) to the unstable feature attributes.
2020-05-20 14:21:09 +02:00
Dylan DPC
68fd4e098c
Rollup merge of #72275 - marmeladema:fix-issue-71104-2, r=ecstatic-morse
Continue lowering for unsupported async generator instead of returning an error.

This way the hir is "valid" and we can remove one more call to
`opt_node_id_to_hir_id` but an error is still emitted.

This is another partial fix for #71104

r? @eddyb
2020-05-20 14:21:07 +02:00
Dylan DPC
5c52f9f916
Rollup merge of #72139 - nnethercote:standalone-fold, r=cuviper
Make `fold` standalone.

`fold` is currently implemented via `try_fold`, but implementing it
directly results in slightly less LLVM IR being generated, speeding up
compilation of some benchmarks.

r? @cuviper
2020-05-20 14:21:06 +02:00
Dylan DPC
14c439177b
Rollup merge of #71863 - mibac138:self-import, r=estebank
Suggest fixes and add error recovery for `use foo::self`

Fixes #63741.
I have implemented 2 suggestions on how to fix a `use foo::self` import, however I feel like showing them both might be too verbose.

Additionally, I have also implemented error recovery as [menitoned](https://github.com/rust-lang/rust/issues/63741#issuecomment-602391091) by @comex.

I believe r? @estebank deals with diagnostics.
2020-05-20 14:21:00 +02:00
Wesley Wiser
8ac1699ea1 [self-profling] Record the cgu name when doing codegen for a module 2020-05-20 07:40:42 -04:00
Elrendio
f5b49572dd FIX - Char documentation for unexperienced users 2020-05-20 12:18:09 +02:00
Guillaume Gomez
e9ae64cca7 Improve E0599 explanation 2020-05-20 12:03:24 +02:00
bors
f182c4af8a Auto merge of #71923 - csmoe:issue-70818, r=tmandry
Check non-Send/Sync upvars captured by generator

Closes #70818
r? @tmandry
2020-05-20 09:28:25 +00:00
Bastian Kauschke
a5a4ec98e2 Add tests for opaque types 2020-05-20 09:16:08 +02:00
Bastian Kauschke
ea47fdf785 comment return sites 2020-05-20 09:16:08 +02:00
Bastian Kauschke
5a5017ec63 Be more conservative concerning structural_match 2020-05-20 09:16:08 +02:00
Bastian Kauschke
ecab35b45a note for ty::Error. 2020-05-20 08:38:16 +02:00
Bastian Kauschke
038523963a exhaustively match during structural match checking 2020-05-20 08:38:16 +02:00
bors
64ad709ad4 Auto merge of #71769 - petrochenkov:crto, r=cuviper
linker: More systematic handling of CRT objects

Document which kinds of `crt0.o`-like objects we link and in which cases, discovering bugs in process.
`src/librustc_target/spec/crt_objects.rs` is the place to start reading from.

This PR also automatically contains half of the `-static-pie` support (https://github.com/rust-lang/rust/pull/70740), because that's one of the six cases that we need to consider when linking CRT objects.

This is a breaking change for custom target specifications that specify CRT objects.

Closes https://github.com/rust-lang/rust/issues/30868
2020-05-20 05:47:10 +00:00
bors
692a26e8d7 Auto merge of #72339 - ehuss:update-cargo, r=ehuss
Update cargo

9 commits in cb06cb2696df2567ce06d1a39b1b40612a29f853..500b2bd01c958f5a33b6aa3f080bea015877b83c
2020-05-08 21:57:44 +0000 to 2020-05-18 17:12:54 +0000
- Handle LTO with an rlib/cdylib crate type (rust-lang/cargo#8254)
- Gracefully handle errors during a build. (rust-lang/cargo#8247)
- Update `im-rc` to 15.0.0 (rust-lang/cargo#8255)
- Fix `cargo update` with unused patch. (rust-lang/cargo#8243)
- Rephrased error message for disallowed sections in virtual workspace (rust-lang/cargo#8200)
- Ignore broken console output in some situations. (rust-lang/cargo#8236)
- Expand error message to explain that a string was found (rust-lang/cargo#8235)
- Add context to some fs errors. (rust-lang/cargo#8232)
- Move SipHasher to an isolated module. (rust-lang/cargo#8233)
2020-05-20 02:22:44 +00:00
Gary Guo
564ebbb0d1 Use fcntl-based file lock for non-Linux unix 2020-05-20 02:27:50 +01:00
Dylan MacKenzie
3ff93177cf Document why we don't look at storage liveness
...when determining what locals are live.

A local cannot be borrowed before it is `storage_live` and
`MaybeBorrowedLocals` already invalidates borrows on `StorageDead`.
Likewise, a local cannot be initialized before it is marked StorageLive
and is marked as uninitialized after `StorageDead`.
2020-05-19 17:52:08 -07:00
Dylan MacKenzie
dd49c6ffd1 Document assumptions made in generator transform for analyses
The generator transform needs to inspect all possible dataflow states.
This can be done with half the number of bitset union operations if we
can assume that the relevant analyses do not use "before" effects.
2020-05-19 17:52:08 -07:00
Dylan MacKenzie
def207e262 Look for storage conflicts before terminator effect 2020-05-19 17:52:08 -07:00
Dylan MacKenzie
d8e0807052 Add comment for strange conditional 2020-05-19 17:52:08 -07:00
Dylan MacKenzie
90da274958 Add comment explaining the extra record_conflicts 2020-05-19 17:52:08 -07:00
Dylan MacKenzie
157631b71d Remove MaybeRequiresStorage 2020-05-19 17:52:06 -07:00
Dylan MacKenzie
3508592c26 Update tests with new generator sizes 2020-05-19 17:50:06 -07:00