Commit Graph

72992 Commits

Author SHA1 Message Date
bors
63efff5a71 Auto merge of #47009 - eddyb:issue-46855, r=arielb1
rustc_trans: support ZST indexing involving uninhabited types.

Fixes #46855 in a minimal way. I decided against supporting non-memory `Rvalue::Len` in this PR (see https://github.com/rust-lang/rust/issues/46855#issuecomment-352965807), as `PlaceContext::Inspect` is also used for `Rvalue::Discriminant`.

r? @arielb1
2017-12-27 12:54:25 +00:00
bors
71ed31f240 Auto merge of #47007 - eddyb:issue-46897, r=arielb1
rustc: don't use union layouts for tagged union enums.

Fixes #46897, fixes #43517 (AFAICT from the testcases).
This PR doesn't add any testcases, we should try to at least get perf ones (cc @Mark-Simulacrum).
I couldn't find an example in those issues where the choice of LLVM array vs struct (with N identical fields) for padding filler types is still needed, *on top of* this change, to prevent excessive LLVM sinking.

r? @arielb1
2017-12-27 10:19:43 +00:00
bors
3fd27b2718 Auto merge of #46977 - est31:column_fix, r=dtolnay
Make the output of the column! macro 1 based

Fixes  #46868.

I didn't add any regression tests as the change already had to change tests inside the codebase.

r? @dtolnay
2017-12-27 07:11:50 +00:00
bors
e8098c5c4d Auto merge of #46803 - estebank:non-ascii-def-span, r=petrochenkov
Use def span for non-ascii ident feature gate error
2017-12-27 04:23:10 +00:00
Bastian Köcher
09f94bea4a Revert "New generated main returns void"
This reverts commit 267800a7c0.
2017-12-27 01:23:28 +01:00
Marco A L Barbosa
36d486a894 Update compiler_builtins 2017-12-26 22:22:21 -02:00
Bastian Köcher
5a4298b6d3 Don't use process::exit as it is an unreachable on wasm32 2017-12-26 23:53:51 +01:00
Ed Schouten
304a7b7985 Link against -lunwind on CloudABI.
CloudABI makes use of LLVM's libunwind to do stack unwinding. It is
installed under the name libunwind.a.
2017-12-26 23:32:42 +01:00
Alex Crichton
2cdd1c4df3 rustc: Switch start_fn to hidden visibility
This'll avoid exporting a symbol from binaries unnecessarily and should help the
linker clean things up if it can.
2017-12-26 14:26:03 -08:00
bors
cddc4a62d8 Auto merge of #46975 - matthewjasper:mir-moveck-asm, r=arielb1
[MIR Borrowck] Moveck inline asm statements

Closes #45695

New behavior:
* Input operands to `asm!` are moved, direct output operands are initialized.
* Direct, non-read-write outputs match the assignment changes in #46752 (Shallow writes, end borrows).
2017-12-26 20:47:31 +00:00
Eduard-Mihai Burtescu
97228f5e7b rustc: don't use union layouts for tagged union enums. 2017-12-26 22:36:20 +02:00
Eduard-Mihai Burtescu
57bb8ab832 rustc_trans: support ZST indexing involving uninhabited types. 2017-12-26 22:35:53 +02:00
Josh Holmer
8d49d113e5 Pass correct span when lowering grouped imports
Solves incorrect diagnostics for unused or deprecated imports. Closes #46576.

Deprecated imports had an existing test which asserted the incorrect span.
That test has been corrected as part of this commit.
2017-12-26 14:19:49 -05:00
bors
503153e950 Auto merge of #46554 - kennytm:45861-step-4-5-6-7-upload-test-result-and-remove-toolstate-toml, r=alexcrichton
[auto-toolstate] Upload the toolstate result to an external git repository, and removes BuildExpectation

This PR consists of 3 commits.

1. (Steps 4–6) The `toolstate.json` output previously collected is now pushed to the https://github.com/rust-lang-nursery/rust-toolstate repository.
2. (Step 7) Revert commit ab018c7, thus removing all traces of `BuildExpectation` and `toolstate.toml`.
3. (Step 8) Adjust CONTRIBUTION.md for the new procedure.

These are the last steps of #45861. After this PR, the toolstate will be automatically computed and published to https://rust-lang-nursery.github.io/rust-toolstate/. There is no need to manage toolstate.toml again.

Closes #45861.
2017-12-26 18:03:00 +00:00
David Alber
a087733a4b Updating Contributor Covenant links
The current link 301s to a new destination.
2017-12-26 09:27:49 -08:00
kennytm
44954ab52d
Clarify toolstate names. Move publish.py to a more convenient location. 2017-12-27 00:00:46 +08:00
kennytm
d7488c3089
Update CONTRIBUTING.md now that toolstate.toml is gone. 2017-12-27 00:00:45 +08:00
kennytm
2566fa25c7
Revert "Add a file to trivially disable tool building or testing"
This reverts commit ab018c76e1.

This also adds the `ToolBuild::is_ext_tool` field to replace the previous
`ToolBuild::expectation` field, to indicate whether a build-failure of
certain tool is essential.
2017-12-27 00:00:45 +08:00
kennytm
519f92f2aa
Upload the toolstate to the remote repository. 2017-12-27 00:00:45 +08:00
kennytm
0692b3df2e
cargo update and add miri as the rustc workspace member. 2017-12-27 00:00:44 +08:00
bors
269827ced9 Auto merge of #46956 - estebank:incompatible-arm-span-label, r=Zoxc
"incompatible arm" diagnostic span tweak

Use span label instead of span note for single line spans in
"incompatible arm" diagnostic.
2017-12-26 15:15:08 +00:00
Marco A L Barbosa
e3231e35b6 Add armv4t-unknown-linux-gnueabi target 2017-12-26 13:07:58 -02:00
Aaron Power
a1438b704c
Update RELEASES.md 2017-12-26 14:37:34 +00:00
Seiichi Uchida
d1aa29ba32 Do not panic on interpolated token inside quote macro 2017-12-26 22:11:18 +09:00
Bastian Köcher
81e375dba5 Change name of lang_start_real to lang_start_internal
Also remove `'static` from `__rust_begin_short_backtrace`
2017-12-26 12:26:39 +01:00
Bastian Köcher
7dfec34a20 Split lang_start in two functions to reduce generated code 2017-12-26 12:26:39 +01:00
Bastian Köcher
c2f22f01a9 Adds whitespace 2017-12-26 12:26:39 +01:00
Bastian Köcher
dbbba55382 Rework the exit failure and success declaration for wasm32 2017-12-26 12:26:39 +01:00
Bastian Köcher
f972f529b2 Revert "Just compare the symbol names and types, not the addresses"
This reverts commit 7d4d98e5c870a2dcdca8ea3aa47ecee680a35e60.
2017-12-26 12:26:39 +01:00
Bastian Köcher
7efeeba13a Use start for the sepcomp-inlining test 2017-12-26 12:26:39 +01:00
Bastian Köcher
072f3ebd87 Use move for optimization purposes 2017-12-26 12:26:39 +01:00
Bastian Köcher
faff382c3d Don't emit the termination lang item in tests 2017-12-26 12:26:39 +01:00
Bastian Köcher
347165fd5c The test functions are now in the same compile unit 2017-12-26 12:26:39 +01:00
Bastian Köcher
88bf2b4630 Removes some obscure transmute call in lang_start 2017-12-26 12:26:39 +01:00
Bastian Köcher
83cb299e3e Just compare the symbol names and types, not the addresses 2017-12-26 12:26:39 +01:00
Bastian Köcher
a8a9a05abb Convert codegen-unit tests to use start instead of main
The new Termination traits brings in the unwinding machinery and that
blows up the required `TRANS_ITEM`s.
2017-12-26 12:26:39 +01:00
Bastian Köcher
c7a57d2855 Adds termination_trait feature gate 2017-12-26 12:26:39 +01:00
Bastian Köcher
8f539b09df Fixes codegen-units tests 2017-12-26 12:26:39 +01:00
Bastian Köcher
267800a7c0 New generated main returns void 2017-12-26 12:26:39 +01:00
Bastian Köcher
8232734216 Fall back to main -> () when termination trait language item is not enabled 2017-12-26 12:26:39 +01:00
Bastian Köcher
f842f7547e Fixes tests 2017-12-26 12:26:39 +01:00
Bastian Köcher
99a108c036 Fixes compilation errors and adds proposed improvements 2017-12-26 12:26:39 +01:00
Bastian Köcher
011c9eac35 Fixes compile bug caused by upstream changes 2017-12-26 12:26:39 +01:00
Niko Matsakis
19adeaa3c6 convert print-type-sizes to use start instead of main
This avoids bringing in unwind machinery.
2017-12-26 12:26:39 +01:00
Niko Matsakis
b452c432cd avoid ICE when fields are not laid out in order 2017-12-26 12:26:39 +01:00
Bastian Köcher
d7918fb2e8 Implements RFC 1937: ? in main
This is the first part of the RFC 1937 that supports new
`Termination` trait in the rust `main` function.
2017-12-26 12:26:39 +01:00
Marco A L Barbosa
606a0a5da0 Add dist builder for armv5te-unknown-linux-gnueabi 2017-12-26 09:21:09 -02:00
bors
0efdfa1d62 Auto merge of #46941 - ScottAbbey:freebsd-build-update, r=alexcrichton
Re-do the FreeBSD cross-builds to use Clang and libc++. Fixes #44433

Reviving #45077, from @jld:

> The main goal here is to use FreeBSD's normal libc++, instead of
> statically linking the libstdc++ packaged with GCC, because that
> libstdc++ has bugs that cause rustc to deadlock inside LLVM.
>
> But the easiest way to use libc++ is to switch the build from GCC to
> Clang, and the Clang package in the Ubuntu image already knows how to
> cross-compile (given a sysroot and preferably cross-binutils), so the
> toolchain script now uses that instead of building a custom compiler.
>
> This also de-duplicates the build-toolchain.sh script.

#45077 was close but didn't quite make it.  I rebased @jld's work off the current `master` and started with that.

I was able to determine that this Travis error (https://github.com/rust-lang/rust/pull/45077#issuecomment-336029862) was ultimately caused by `src/librustc_llvm/build.rs` attempting to follow a wrong value in `LLVM_STATIC_STDCPP` (https://github.com/rust-lang/rust/pull/45077#issuecomment-352639456).

I looked at the downstream port for FreeBSD (https://svnweb.freebsd.org/ports/head/lang/rust/) and it seems like they do not use `--enable-llvm-static-stdcpp`.

Since `libc++` is included in the FreeBSD 10+ base system, we don't need to statically link it either?

So in b989428f7d I have set the FreeBSD build to not actually use `LLVM_STATIC_STDCPP`.

I was able to run `./src/ci/docker/run.sh` with both `dist-i686-freebsd` and `dist-x86_64-freebsd` successfully and in about 1 minute of testing it seemed like the dist-x86_64-freebsd results worked on a FreeBSD 11 system.

It should fix #44433, which seems to be affecting many potential users.  Also FreeBSD users should be able to `./x.py build` which should help anyone who wants to upstream fixes for FreeBSD.

Questions:

Does this approach seem to be the right way to go? Do we actually really want to statically link `libc++`? (I tried that here, but it ultimately ran into a roadblock on x86_64: https://github.com/rust-lang/rust/pull/45077#issuecomment-353293414)

Can we rewrite the comment here to be more clear about why some systems aren't going to actually use this option:
b989428f7d/src/bootstrap/compile.rs (L550-L553)

How does this affect users of older FreeBSD systems? It seemed like no one was complaining about using a 10.3 base version in the thread for #45077.  FreeBSD seems to only officially support 10.3, 10.4, and 11.x right now, do we have to consider older users? The `libc++` stuff came in for FreeBSD 10, older FreeBSD used `libstdc++`.

Looks like @alexcrichton was leading the discussion on the previous issue:

r? @alexcrichton

Let me know what I can do to help get this through.
2017-12-26 11:16:12 +00:00
Seiichi Uchida
f6f9cbe560 Add tests to fixed ICEs
Closes #27078. Closes #27985. Closes #39848. Closes #42164.
Closes #42479. Closes #45152. Closes #45662. Closes #45876.
Closes #45965.
2017-12-26 19:24:48 +09:00
bors
8cdde6db71 Auto merge of #47012 - kennytm:rollup, r=kennytm
Rollup of 8 pull requests

- Successful merges: #46928, #46930, #46933, #46939, #46940, #46943, #46979, #46986
- Failed merges:
2017-12-26 08:33:23 +00:00