Commit Graph

68211 Commits

Author SHA1 Message Date
bgermann
dba52ff9cd restore 'if: branch = auto' for cross2 builder 2017-10-05 20:42:27 +02:00
bgermann
724dd46536 Add libsocket and libresolv to Solaris builder 2017-10-05 19:05:19 +02:00
bgermann
9bff9e0ce9 delete 'if: branch = auto' for cross2 builder 2017-10-05 17:21:28 +02:00
bgermann
a78ce07381 Fix CC for solaris environments 2017-10-05 13:48:34 +02:00
bgermann
4e69d2e3eb Merge dist-solaris with cross2 builder 2017-10-05 01:22:30 +02:00
bgermann
a82891ab5c Rename dist-fuchsia builder to cross2 2017-10-05 00:40:36 +02:00
bgermann
80fe86f8c7 Add build environment for Solaris
This can be used to build rust-std.

The dilos illumos distribution was chosen, because illumos is free software
as opposed to Oracle Solaris and dilos is the only illumos distribution that
supports x86_64 and sparcv9 at the same level.
2017-10-03 14:48:39 +02:00
bors
61bad301f1 Auto merge of #44920 - vi:rustdoc_implementors_src_link, r=GuillaumeGomez
rustdoc: Render [src] links for trait implementors

Should close #43893.

<s>No tests [yet].</s>

r? @QuietMisdreavus
2017-10-03 08:04:33 +00:00
bors
67ed4891db Auto merge of #44966 - zackmdavis:no_mangle_no_snake, r=aturon
make non_snake_case lint allow extern no-mangle functions

Resolves #31924.

r? @sfackler
2017-10-03 02:26:27 +00:00
bors
bdcb7fbbca Auto merge of #44977 - steveklabnik:update-mdbook, r=alexcrichton
update mdbook

Fixes #44704
2017-10-02 22:39:51 +00:00
bors
185cc5f26d Auto merge of #44885 - lu-zero:master, r=alexcrichton
More Altivec Intrinsics

Float-specific intrinsics
2017-10-02 17:18:20 +00:00
steveklabnik
1bbf41da6f update mdbook
Fixes #44704
2017-10-02 10:16:32 -04:00
Vitaly _Vi Shukela
acef039de8
rustdoc: Remove cruft from the test
per @GuillaumeGomez's sample, but with one change.
2017-10-02 16:54:35 +03:00
bors
0f0f5db465 Auto merge of #44959 - arielb1:generic-errors, r=eddyb
handle nested generics in Generics::type_param/region_param

Fixes #44952.

r? @eddyb
2017-10-02 10:06:32 +00:00
Ariel Ben-Yehuda
706e52e2cc fix handling of Self 2017-10-02 10:43:36 +02:00
bors
9ae6ed78ac Auto merge of #44942 - zackmdavis:lint_suggestions, r=estebank
code suggestions for unused-mut, while-true, deprecated-attribute, and unused-parens lints

![lint_suggestions](https://user-images.githubusercontent.com/1076988/31044068-b2074de8-a57c-11e7-9319-6668508b6d1f.png)

r? @estebank
2017-10-02 07:03:26 +00:00
Zack M. Davis
8a14022c5d correct unused-parens lint suggestion to strip exact pair 2017-10-01 20:15:24 -07:00
bors
2146c613d1 Auto merge of #44960 - SeanPrashad:master, r=steveklabnik
Resolves #36284 - vec.rs documentation

Removed comments associated with `[into_vec]` being equivalent to `[shrink_to_fit]` as requested.
2017-10-02 02:17:14 +00:00
Zack M. Davis
b989101a55 make non_snake_case lint allow extern no-mangle functions
Resolves #31924.
2017-10-01 17:20:06 -07:00
bors
a4af9309d0 Auto merge of #44955 - laumann:small-typo-fix, r=steveklabnik
Fix typo: geneartor -> generator
2017-10-01 22:16:04 +00:00
Ariel Ben-Yehuda
ad9986605f fix handling of Self 2017-10-01 23:03:48 +02:00
bors
f1b5225e8b Auto merge of #44919 - diwic:79-pretty-mir, r=arielb1
Mir pretty print: Add cleanup comment

I found it useful to add a comment indicating whether or not a
BasicBlock is a cleanup block or not. Hopefully you'll find it
useful too.
2017-10-01 19:57:01 +00:00
bors
cef4a3ebfa Auto merge of #44897 - Havvy:doc-size_of, r=steveklabnik
Docs for size_of::<#[repr(C)]> items.

Most of this info comes from camlorn's blog post on optimizing struct layout and the Rustonomicon.

I don't really like my wording in the first paragraph.

I also cannot find a definition of what `#[repr(C)]` does for enums that have variants with fields. They're allowed, unlike `#[repr(C)] enum`s with no variants.
2017-10-01 17:32:34 +00:00
Sean Prashad
1ebc7bba79 Resolves #36284 - vec.rs documentation 2017-10-01 12:15:05 -04:00
Ariel Ben-Yehuda
622a78cd54 handle nested generics in Generics::type_param/region_param
Fixes #44952.
2017-10-01 17:15:15 +02:00
Thomas Jespersen
30b19c9e8b Fix typo: geneartor -> generator 2017-10-01 15:40:00 +02:00
bors
3651cddc44 Auto merge of #44945 - petrochenkov:fixtyrec, r=arielb1
Do not require semantic types for all syntactic types when there are errors

Fixes https://github.com/rust-lang/rust/issues/44814
Fixes https://github.com/rust-lang/rust/issues/44858
Fixes https://github.com/rust-lang/rust/issues/44946
r? @nikomatsakis
2017-10-01 13:26:15 +00:00
Vitaly _Vi Shukela
67c9af590d
rustdoc: Style of [src] link for trait implementors
A change suggested by @GuillaumeGomez and @QuietMisdreavus.

Also slight reindenting of the appropriate CSS section.
2017-10-01 16:20:56 +03:00
bors
0defa208dc Auto merge of #44906 - dkl:main-signature, r=nagisa
Fix native main() signature on 64bit

Hello,

in LLVM-IR produced by rustc on x86_64-linux-gnu, the native main() function had incorrect types for the function result and argc parameter: i64, while it should be i32 (really c_int). See also #20064, #29633.

So I've attempted a fix here. I tested it by checking the LLVM IR produced with --target x86_64-unknown-linux-gnu and i686-unknown-linux-gnu. Also I tried running the tests (`./x.py test`), however I'm getting two failures with and without the patch, which I'm guessing is unrelated.
2017-10-01 09:14:53 +00:00
bors
1c09315f6d Auto merge of #44921 - est31:master, r=alexcrichton
Update the libcompiler_builtins submodule

Pulls in the latest changes from libcompiler_builtins.

It should work, but it would be best if this wouldn't get put into a rollup so that bisecting is possible if there is a regression.

r? @alexcrichton
2017-10-01 01:41:42 +00:00
Daniel Klauer
a4e83731e9 test: Update target specs test for new target-c-int-width field 2017-09-30 23:45:36 +02:00
bors
afe9320785 Auto merge of #44944 - dbrgn:trace-macros-docs, r=QuietMisdreavus
Docs: Add trace_macros! to unstable book

As TIL'd at Rustfest :)

Note: This is unfortunately untested, since I'm on my laptop battery, and compiling LLVM would probably eat at least 50% of it on my dual core CPU. (Is there a way to build docs without compiling LLVM?)
2017-09-30 20:46:57 +00:00
Zack M. Davis
e3b498971d code suggestions for unused-mut, while-true lints; UI test 2017-09-30 11:31:12 -07:00
Zack M. Davis
5c9f806d78 code suggestion for unused-parentheses lint
Resolves #42892.
2017-09-30 11:31:12 -07:00
Zack M. Davis
f2c5acd611 code suggestion for deprecated-attribute lint
Also, fix the deprecation message for the late no-debug feature.
2017-09-30 11:31:12 -07:00
bors
c6884b12d9 Auto merge of #44783 - alexcrichton:lto-codegen-units, r=michaelwoerister
rustc: Enable LTO and multiple codegen units

This commit is a refactoring of the LTO backend in Rust to support compilations
with multiple codegen units. The immediate result of this PR is to remove the
artificial error emitted by rustc about `-C lto -C codegen-units-8`, but longer
term this is intended to lay the groundwork for LTO with incremental compilation
and ultimately be the underpinning of ThinLTO support.

The problem here that needed solving is that when rustc is producing multiple
codegen units in one compilation LTO needs to merge them all together.
Previously only upstream dependencies were merged and it was inherently relied
on that there was only one local codegen unit. Supporting this involved
refactoring the optimization backend architecture for rustc, namely splitting
the `optimize_and_codegen` function into `optimize` and `codegen`. After an LLVM
module has been optimized it may be blocked and queued up for LTO, and only
after LTO are modules code generated.

Non-LTO compilations should look the same as they do today backend-wise, we'll
spin up a thread for each codegen unit and optimize/codegen in that thread. LTO
compilations will, however, send the LLVM module back to the coordinator thread
once optimizations have finished. When all LLVM modules have finished optimizing
the coordinator will invoke the LTO backend, producing a further list of LLVM
modules. Currently this is always a list of one LLVM module. The coordinator
then spawns further work to run LTO and code generation passes over each module.

In the course of this refactoring a number of other pieces were refactored:

* Management of the bytecode encoding in rlibs was centralized into one module
  instead of being scattered across LTO and linking.
* Some internal refactorings on the link stage of the compiler was done to work
  directly from `CompiledModule` structures instead of lists of paths.
* The trans time-graph output was tweaked a little to include a name on each
  bar and inflate the size of the bars a little
2017-09-30 15:01:35 +00:00
petrochenkov
8037c28a4a Do not require semantic types for all syntactic types when there are type errors 2017-09-30 17:41:00 +03:00
Daniel Klauer
12a8bc6eb9 rustc: Use 16bit c_int for msp430
Fix regression from c2fe69b9, where main() signature was changed from
using 16bit isize to 32bit c_int for argc parameter/result.
2017-09-30 16:30:12 +02:00
Daniel Klauer
a204c193ca rustc: Specify c_int width for each target
(all i32 for now, as in liblibc)
2017-09-30 15:54:08 +02:00
Danilo Bargen
eb59952fbd Docs: Add trace_macros! to unstable book 2017-09-30 15:27:42 +02:00
bors
c4cca3a72d Auto merge of #44936 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 15 pull requests

- Successful merges: #44124, #44287, #44320, #44694, #44708, #44794, #44797, #44824, #44836, #44840, #44845, #44854, #44889, #44900, #44903
- Failed merges:
2017-09-30 10:03:00 +00:00
Alex Crichton
ded38dbfc2 rustc: Enable LTO and multiple codegen units
This commit is a refactoring of the LTO backend in Rust to support compilations
with multiple codegen units. The immediate result of this PR is to remove the
artificial error emitted by rustc about `-C lto -C codegen-units-8`, but longer
term this is intended to lay the groundwork for LTO with incremental compilation
and ultimately be the underpinning of ThinLTO support.

The problem here that needed solving is that when rustc is producing multiple
codegen units in one compilation LTO needs to merge them all together.
Previously only upstream dependencies were merged and it was inherently relied
on that there was only one local codegen unit. Supporting this involved
refactoring the optimization backend architecture for rustc, namely splitting
the `optimize_and_codegen` function into `optimize` and `codegen`. After an LLVM
module has been optimized it may be blocked and queued up for LTO, and only
after LTO are modules code generated.

Non-LTO compilations should look the same as they do today backend-wise, we'll
spin up a thread for each codegen unit and optimize/codegen in that thread. LTO
compilations will, however, send the LLVM module back to the coordinator thread
once optimizations have finished. When all LLVM modules have finished optimizing
the coordinator will invoke the LTO backend, producing a further list of LLVM
modules. Currently this is always a list of one LLVM module. The coordinator
then spawns further work to run LTO and code generation passes over each module.

In the course of this refactoring a number of other pieces were refactored:

* Management of the bytecode encoding in rlibs was centralized into one module
  instead of being scattered across LTO and linking.
* Some internal refactorings on the link stage of the compiler was done to work
  directly from `CompiledModule` structures instead of lists of paths.
* The trans time-graph output was tweaked a little to include a name on each
  bar and inflate the size of the bars a little
2017-09-30 00:22:15 -07:00
bors
4491ea5a3f Auto merge of #44893 - spastorino:remove_new_and_index, r=nikomatsakis
Remove new and index methods already implement for Idx

These are the rest of the repeated implementations for new and index methods. Follow up of https://github.com/rust-lang/rust/pull/44889
2017-09-30 06:56:49 +00:00
Zack M. Davis
d663003e03 fix comment typo, CodeSuggestion path in doc comment
`CodeSuggestion` doesn't live in the `diagnostic` module.
2017-09-29 23:42:24 -07:00
Vitaly _Vi Shukela
d892e985b0
rustdoc: A test for local and foreign [src] trait impl links 2017-09-30 03:17:51 +03:00
Mark Simulacrum
d6451f0b33 Rollup merge of #44903 - kallisti5:ci-build-disabled, r=aidanhs
ci: Fix building disabled containers

* Change the context into the disabled directory. Now you can test
  containers which are disabled.
2017-09-29 17:59:05 -06:00
Mark Simulacrum
4489a7a0bb Rollup merge of #44900 - Havvy:normalize-lang-attribute-spacing, r=sfackler
Normalize spaces in lang attributes.

So, like, I grepped for all `lang` attributes for *reasons* and I noticed that they all share the same spacing of `#[lang = "item_name"]` except these five instances. So I decided to fix that. So enjoy this PR of exactly ten spaces.
2017-09-29 17:59:04 -06:00
Mark Simulacrum
37c74e1979 Rollup merge of #44889 - spastorino:remove_new, r=arielb1
Remove DepNodeIndex::new is already impl for Idx
2017-09-29 17:59:03 -06:00
Mark Simulacrum
7756d39dca Rollup merge of #44854 - lucasem:atomic-docs, r=steveklabnik
docs improvement sync::atomic::Atomic*

Addresses the `Atomic*` part of #29377.
r? @steveklabnik
2017-09-29 17:59:02 -06:00
Mark Simulacrum
7c3d376086 Rollup merge of #44845 - SimonSapin:nll_mod_rs, r=nikomatsakis
Move src/librustc_mir/transform/nll.rs to a subdirectory

CC https://github.com/rust-lang/rust/issues/43234
2017-09-29 17:59:01 -06:00