Commit Graph

1739 Commits

Author SHA1 Message Date
bors 11432ba980 Auto merge of #51230 - nikic:no-verify-lto, r=pnkfelix
Disable LLVM verification by default

Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO.

Also wondering what the sentiment is on disabling verification by default (and e.g. only enabling it on ALT builds with assertions). This does not seem terribly useful outside of rustc development and it does seem to show up in profiles (at something like 3%).

**EDIT:** A table showing the various configurations and what is enabled when.

| Configuration | Dynamic verification performed | LLVM static assertions compiled in |
| --- | --- | --- |
| alt builds | | yes |
| nightly builds | | no |
| stable builds | | no |
| CI builds | | |
| dev builds in a checkout | | |
2018-07-11 12:12:13 +00:00
Oliver Schneider 0fc61be68e
Remove unused variable 2018-07-11 10:35:49 +02:00
Oliver Schneider 5254343f1f
Hitchhike with rls into stable 2018-07-11 10:35:09 +02:00
ljedrz 72b908ffbe Restore #![deny(warnings)] 2018-07-10 21:20:04 +02:00
ljedrz d1e3567250 Deny bare trait objects in `src/bootstrap`. 2018-07-10 18:10:05 +02:00
NODA, Kai 97d0bc3f04
bootstrap: our best to achieve atomic rename on Win32
This is a tricky operation to implement on Win32; see
https://ci.appveyor.com/project/nodakai/python-win-behavior

Signed-off-by: NODA, Kai <nodakai@gmail.com>
2018-07-10 22:50:20 +08:00
NODA, Kai bcb8a06ef7 bootstrap: write texts to a .tmp file first for atomicity
If you are using a hard-linked file as your config.toml, this change will affect the way other instances of the file is modified.
The original version would modify all other instances whereas the new version will leave others unchanged, reducing the ref count by one.

Signed-off-by: NODA, Kai <nodakai@gmail.com>
2018-07-10 22:50:00 +08:00
bors 77117e3836 Auto merge of #52177 - ljedrz:bare_gcc_warning, r=alexcrichton
Warn windows-gnu users that the bundled gcc can't compile

Add a `DO NOT USE THIS gcc.exe FOR COMPILATION.txt` file to `lib\rustlib\*-pc-windows-gnu\bin` folders in `windows-gnu` installations in order to warn against attempting to use the bundled `gcc.exe` as a C compiler. I'm pretty sure that location is usually found manually, so this should be easily noticeable.

This mistake has been made plenty of times and has lead to misunderstandings:
Rust: [Bundled gcc (windows x64) is unable to build any c file](https://github.com/rust-lang/rust/issues/24418)
gtk-rs:    [Compiling on windows](https://github.com/gtk-rs/gtk/issues/625)
bzip2-rs: [Build failure at gcc level: blocksort.c not found](https://github.com/alexcrichton/bzip2-rs/issues/30)

Alternatives: rename the bundled `gcc.exe` to e.g. `rustc-gcc.exe` or `gcc-linker.exe`. This might require a more comprehensive change or break crates already using it as a linker.

r? @alexcrichton
2018-07-10 06:52:20 +00:00
ljedrz 232e77e007 Change gcc warning file name, remove unnecessary reference 2018-07-09 21:25:16 +02:00
ljedrz 6b6a7a4691 Warn windows-gnu users that the bundled gcc can't compile 2018-07-09 15:28:12 +02:00
gnzlbg 4ff90c7e0a bump minimum LLVM version to 5.0 2018-07-09 11:35:52 +02:00
Oliver Schneider 7a8e085835 Also distribute cargo clippy 2018-07-09 10:15:30 +02:00
Oliver Schneider 68620b14a2 Inject clippy into the rls again
Also makes sure we actually point to the local rls
2018-07-09 10:10:42 +02:00
Mark Rousskov 4784883e52
Rollup merge of #52117 - Eijebong:filetime, r=alexcrichton
Dedupe filetime
2018-07-06 21:29:19 -06:00
Bastien Orivel 933c299443 Dedupe filetime 2018-07-06 22:52:40 +02:00
bors e06c875442 Auto merge of #51757 - nielx:fix/haiku-fixes, r=nagisa
Haiku: several smaller fixes to build and run rust on Haiku

This PR combines three small patches that help Rust build and run on the Haiku platform. These patches do not intend to impact other platforms.
2018-07-06 20:05:23 +00:00
kennytm f1a36fc29f
Rollup merge of #52080 - oli-obk:dep_dedup_diagnostics, r=kennytm
Improve dependency deduplication diagnostics

r? @kennytm

this is obviously hard to test 😆

cc #52072
2018-07-06 12:56:24 +08:00
kennytm 185fb7b77c
Rollup merge of #51619 - mksully22:ppc64le_rust, r=alexcrichton
rust: add initial changes to support powerpc64le musl

Initial changes to support rustc building on ppc64le with musl. A PR was also submitted to libc component https://github.com/rust-lang/libc/pull/1023 to add changes to libc musl definitions.

A PR was submitted on Alpine https://github.com/alpinelinux/aports/pull/4549 with equivalent temporary patches for building on Alpine for now.

As a verification test a github project was put together to build ppc64le versions of rustc, rust-stdlib, and cargo on Alpine, https://github.com/mksully22/ppc64le_alpine_rust_1.26.2
2018-07-06 07:07:10 +08:00
bors 2d5a295d51 Auto merge of #51917 - alexcrichton:update, r=Mark-Simulacrum
Update crates in `Cargo.lock`

This is a "hopefully routine" update of our crates.io-based crates in
`Cargo.lock`, and let's see how it fares on CI...
2018-07-05 20:25:00 +00:00
Oliver Schneider f352e98ddc Address review comments 2018-07-05 19:30:06 +02:00
Oliver Schneider f1e3a5a24b Only display difference of features, not all features 2018-07-05 19:02:43 +02:00
Oliver Schneider 82a1328740 Vertical list of tools to check 2018-07-05 18:48:56 +02:00
Alex Crichton d825115978 Update Cargo.lock dependencies
Run `cargo update` and let's see how far we can get!
2018-07-05 09:30:27 -07:00
bors 6fc21e5576 Auto merge of #51936 - japaric:rust-lld, r=alexcrichton
rename rustc's lld to rust-lld

to not shadow the system installed LLD when linking with LLD.

Before:

- `-C linker=lld -Z linker-flavor=ld.lld` uses rustc's LLD
- It's not possible to use a system installed LLD that's named `lld`

With this commit:

- `-C linker=rust-lld -Z linker-flavor=ld.lld` uses rustc's LLD
- `-C linker=lld -Z linker-flavor=ld.lld` uses the system installed LLD

we don't offer guarantees about the availability of LLD in the rustc sysroot so we can rename the tool as long as we don't break the wasm32-unknown-unknown target which depends on it.

r? @alexcrichton we discussed this before
2018-07-05 06:44:16 +00:00
Jorge Aparicio 31ed5c7a01 in the second copy lld is already named rust-lld 2018-07-04 23:10:10 -05:00
Alex Crichton ef41cf0288 Compile stage0 tools with the raw bootstrap compiler
This commit updates the stage0 build of tools to use the libraries of the stage0
compiler instead of the compiled libraries by the stage0 compiler. This should
enable us to avoid any stage0 hacks (like missing SIMD).
2018-07-03 18:06:29 -07:00
Mike Sullivan dd069ea9f6 rust: add initial changes to support powerpc64le musl
amend powerpc64le_unknown_linux_musl.rs to fix copyright date
2018-07-03 18:18:03 +00:00
Pietro Albini 492518fcd5
Rollup merge of #52006 - Mark-Simulacrum:keep-stage-fix, r=alexcrichton
Change --keep-stage to apply more often

Previously, the --keep-stage argument would only function for compilers
that were depended on by future stages. For example, if trying to build
a stage 1 compiler you could --keep-stage 0 to avoid re-building the
stage 0 compiler. However, this is often not what users want in
practice.

The new implementation essentially skips builds all higher stages of the
compiler, so an argument of 1 to keep-stage will skip rebuilds of the
libraries, just linking them into the sysroot. This is unlikely to work
well in cases where metadata or similar changes have been made, but is
likely fine otherwise.

This change is somewhat untested, but since it shouldn't have any effect
except with --keep-stage, I don't see that as a large problem.

r? @alexcrichton
cc @nikomatsakis - I believe you wanted this functionality
2018-07-03 11:31:13 +02:00
Pietro Albini 6af4397e19
Rollup merge of #52004 - kennytm:toolstate-fixes, r=Mark-Simulacrum
toolstate: Fixed detection of changed submodule, and other fixes.

1. Make sure that if a submodule is updated but failed to test-pass, we'll block the merge.
2. Make sure failure on external docs (nomicon/RBE/etc) are properly checked.
3. If the commit message starts with "Update RLS" (or clippy etc), automatically run the "tools" job on the PR, so that we could know if the update failed before merging.
2018-07-03 11:31:12 +02:00
Mark Rousskov 9eda4aabff Change --keep-stage to apply more
Previously, the --keep-stage argument would only function for compilers
that were depended on by future stages. For example, if trying to build
a stage 1 compiler you could --keep-stage 0 to avoid re-building the
stage 0 compiler. However, this is often not what users want in
practice.

The new implementation essentially skips builds all higher stages of the
compiler, so an argument of 1 to keep-stage will skip rebuilds of the
libraries, just linking them into the sysroot. This is unlikely to work
well in cases where metadata or similar changes have been made, but is
likely fine otherwise.

This change is somewhat untested, but since it shouldn't have any effect
except with --keep-stage, I don't see that as a large problem.
2018-07-02 16:12:56 -06:00
kennytm 20231d774b
Fixed detection of test-fail for doctests. 2018-07-03 05:53:18 +08:00
Mark Rousskov f5570d0ef6 Make explicit that assemble is not run from CLI 2018-07-02 14:46:40 -06:00
Nikolai Merinov ddc1d29442 bootstrap: tests should use rustc from config.toml
Tests should always use "rustc" and "cargo" from config.toml instead
of assuming that stage0 binaries was downloaded to build directory.
2018-07-02 21:28:58 +05:00
bors 4faaf7e335 Auto merge of #51122 - oli-obk:clippy, r=Mark-Simulacrum
Did you mean to block nightlies on clippy?

Discussion: https://gitter.im/rust-lang/WG-clippy?at=5b073b6597a0361fb760cdc2

r? @alexcrichton

did I forget anything?

cc @nrc @Manishearth
2018-07-02 14:04:26 +00:00
Oliver Schneider 78adefd15d Clippy tool also has only a single LICENSE file 2018-07-02 13:57:29 +02:00
Pietro Albini c78bfa33dd
Rollup merge of #51922 - japaric:llvm-tools-preview, r=alexcrichton
rename the llvm-tools component to llvm-tools-preview and tweak its image

as per https://github.com/rust-lang/rust/issues/49584#issuecomment-401217483

r? @alexcrichton or @Mark-Simulacrum
2018-07-01 21:18:50 +02:00
CrLF0710 de2ecea359
Provide llvm-strip in llvm-tools component
Shipping this tool gives people reliable way to reduce the generated executable size.

I'm not sure if this strip tool is available from the llvm version current rust is built on. But let's take a look. @japaric
2018-07-01 16:51:44 +08:00
Oliver Schneider 824c5dfa61 Also run the bootstrap in bootstrap mode 2018-07-01 01:50:12 +02:00
Oliver Schneider 8f55152f84 Did you mean to block nightlies on clippy? 2018-07-01 01:35:39 +02:00
Mark Simulacrum 3d68774968 Notice non-toplevel dll dependencies in rustbuild
Previously Cargo would hardlink all the dependencies into the "root" as
foo.dll and the `toplevel` array would get populated with these, but
that's no longer the case. Instead, cargo will only do this for the
final artifacts/final libraries.

Rustbuild is updated to continue looping through the artifacts mentioned
instead of early-returning. This should fix the bug.

@alexcrichton found the cause of this and suggested this fix.
2018-06-30 13:17:49 -07:00
Mark Simulacrum ad97f8b491 Bootstrap from 1.28.0-beta.3 2018-06-30 13:17:49 -07:00
Jorge Aparicio 807cd36381 rename rustc's lld to rust-lld
to not shadow the system installed LLD when linking with LLD.

Before:

- `-C linker=lld -Z linker-flavor=ld.lld` uses rustc's LLD
- It's not possible to use a system installed LLD that's named `lld`

With this commit:

- `-C linker=rust-lld -Z linker-flavor=ld.lld` uses rustc's LLD
- `-C linker=lld -Z linker-flavor=ld.lld` uses the system installed LLD
2018-06-29 22:20:00 -05:00
Jorge Aparicio c67566ac27 rename the llvm-tools component to llvm-tools-preview and tweak its image 2018-06-29 16:13:40 -05:00
bors 7008a953eb Auto merge of #51725 - Mark-Simulacrum:no-llvm, r=kennytm
Do not build LLVM tools for any of the tools

None of the tools in the list should need LLVM tools themselves as far as I can
tell; if this is incorrect, we can re-enable the tool building later.

The primary reason for doing this is that rust-central-station uses the
BuildManifest tool and building LLVM there is not cached: it takes ~1.5
hours on the 2 core machine. This commit should make nightlies and
stable releases much faster.

Followup to https://github.com/rust-lang/rust/pull/51459, r? @kennytm

I'm mostly relying on CI to test this so probably don't roll it up; I'm not sure how to (and not particularly inclined to) wait for multiple hours to test this locally. I imagine that the failures should be fairly obvious when/if encountered.
2018-06-26 16:26:00 +00:00
Mark Simulacrum 557d05b49d Do not build LLVM tools for any of the tools
None of the tools in the list should need LLVM tools themselves as far as I can
tell; if this is incorrect, we can re-enable the tool building later.

The primary reason for doing this is that rust-central-station uses the
BuildManifest tool and building LLVM there is not cached: it takes ~1.5
hours on the 2 core machine. This commit should make nightlies and
stable releases much faster.
2018-06-25 15:21:13 -06:00
bors b7c6e8f180 Auto merge of #51728 - bradjc:llvm-tools2, r=kennytm
build: add llvm-tools to manifest

This commit expands on a previous commit to build llvm-tools as a rustup component. It causes the llvm-tools component to be built if the extended step is active. It also adds llvm-tools to the build manifest so rustup can find it.

I tested this as far as I could, but had to hack `build-manifest/src/main.rs` a bit as it is not supported on MacOS. The main change I am not sure about is this line:

```rust
self.package("llvm-tools", &mut manifest.pkg, TARGETS);
```

There are numerous calls to `self.package()`, and I'm not sure if `TARGETS`, `HOSTS`, or `["*"]` is appropriate for llvm-tools.

Otherwise I mostly copied the example set by `rustfmt-preview`.
2018-06-25 17:22:12 +00:00
Niels Sascha Reedijk ecf4fe0b6f Haiku: there is no setpriority on this platform. 2018-06-24 17:00:20 +02:00
Brad Campbell f10da5fdb9
build: llvm-tools: replace compiler.host
Use `target` instead.
2018-06-23 17:32:25 -04:00
Brad Campbell 5fc87ebbba
build: llvm_tools tidy 2018-06-23 12:34:18 -04:00
Brad Campbell 739fe4b3c5
build: add llvm-tools to manifest
This commit expands on a previous commit to build llvm-tools as a rustup
component. It causes the llvm-tools component to be built if the
extended step is active. It also adds llvm-tools to the build manifest
so rustup can find it.
2018-06-23 05:57:32 -04:00
Steven Laabs 475405b6af Handle current directory prefix for parsing command arguments in bootstrap test command. 2018-06-22 09:09:31 -05:00
Steven Laabs be3cd464fd Added stripping current directory prefixes when comparing suite path names 2018-06-22 09:09:31 -05:00
bors e11c95dda1 Auto merge of #50336 - japaric:llvm-tools, r=Mark-Simulacrum
ship LLVM tools with the toolchain

this PR adds llvm-{nm,objcopy,objdump,size} to the rustc sysroot (right next to LLD)

this slightly increases the size of the rustc component. I measured these numbers on x86_64 Linux:

- rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.gz 180M -> 193M (+7%)
- rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.xz 129M -> 137M (+6%)

r? @alexcrichton
cc #49584
2018-06-21 11:28:14 +00:00
Jorge Aparicio 9a96876d2d no -Bsymbolic for mac; no static-libstdc++ for windows 2018-06-20 17:48:04 -05:00
bors 6ec1b626ba Auto merge of #51367 - oli-obk:silence!_I_test_you, r=Mark-Simulacrum
Use quiet tests by default

r? @eddyb
2018-06-19 15:05:19 +00:00
Mark Simulacrum b436dca9e6 Prevent Windows filesystem races in bootstrap tests 2018-06-16 11:12:15 -06:00
Mark Simulacrum 18bb86e5e1 Move bootstrap tests to the end of the default test run
Since they are unlikely to fail and are almost never going to fail
except with bootstrap changes (which would be tested locally anyway) it
makes sense to run these tests close to last.
2018-06-16 11:11:06 -06:00
Nikita Popov 3f18a41333 Add verify-llvm-ir flag to config.toml 2018-06-12 21:34:32 +02:00
kennytm ab5e3e66b5
Added comment to explain why only RustIstaller has `llvm_tools = false`. 2018-06-10 04:50:42 +08:00
kennytm b00ea6c2da
Allowing building the codegen backend specifically.
Use `./x.py build src/librustc_codegen_llvm` to build the codegen backend.
2018-06-10 04:31:49 +08:00
kennytm 14d50bfecb
Allow some tools to be run without first building LLVM.
Conservatively only disable LLVM for rust-installer. This should shave
5 minutes from the x86_64-gnu-distcheck job by not building LLVM twice.
2018-06-10 04:31:49 +08:00
Mark Rousskov 8c5002d1e0
Rollup merge of #51437 - est31:rustbuild_metadata, r=Mark-Simulacrum
rustbuild: generate full list of dependencies for metadata

Previously, we didn't send --features to our cargo metadata invocations,
and thus missed some dependencies that we enable through the --features
mechanism.
2018-06-08 17:21:10 -06:00
est31 c28145d1ad rustbuild: generate full list of dependencies for metadata
Previously, we didn't send --features to our cargo metadata invocations,
and thus missed some dependencies that we enable through the --features
mechanism.
2018-06-08 16:50:56 +02:00
Mark Simulacrum 721f2e789a Do not require stage 2 compiler for rustdoc 2018-06-08 08:29:15 -06:00
Oliver Schneider 0c1bcd3871 quiet-tests -> !verbose-tests 2018-06-07 14:40:36 +02:00
Oliver Schneider 9fd026a96c Use quiet tests by default 2018-06-05 15:00:44 +02:00
Mark Simulacrum 79dd148458
Rollup merge of #51317 - oli-obk:incremental_all_the_way, r=Mark-Simulacrum
Allow enabling incremental via config.toml

r? @QuietMisdreavus
2018-06-03 18:18:04 -06:00
Jorge Aparicio 7458af99e9 fix tidy 2018-06-04 00:25:43 +02:00
Jorge Aparicio a2c2ed3c0c use rustc version as llvm-tools version 2018-06-03 18:23:01 +02:00
Jorge Aparicio 66a7db9a35 make a llvm-tools rustup component 2018-06-03 18:23:01 +02:00
Jorge Aparicio 8e673073f3 statically link the tools to libstdc++ 2018-06-03 18:23:01 +02:00
Jorge Aparicio a1ef529703 document what each tools does 2018-06-03 18:23:01 +02:00
Jorge Aparicio b5cdf9dbf9 also ship llvm-profdata 2018-06-03 18:23:01 +02:00
Jorge Aparicio 5e577b8aee ship LLVM tools with the toolchain 2018-06-03 18:23:01 +02:00
Collins Abitekaniza 36eafe5712 impl is_tool on Mode enum
make is_tool inherent prop of mode

fix errors from rebase

resolve issues from review
2018-06-03 17:43:11 +03:00
Oliver Schneider 3b02376c8f command line args trump config.toml settings 2018-06-03 08:44:56 +02:00
Collins Abitekaniza 11333972e8 refactor mode to ToolRustc for Rls & Rustfmt 2018-06-03 05:02:10 +03:00
Collins Abitekaniza fb949b5336 thread tool modes through 2018-06-03 05:02:09 +03:00
Collins Abitekaniza ce10910b69 refactor, make requested changes 2018-06-03 04:59:55 +03:00
Collins Abitekaniza 42ee6d5fd5 refactor Mode enum 2018-06-03 04:59:54 +03:00
Oliver Schneider 7a52f1c7cf Allow enabling incremental via config.toml 2018-06-03 00:13:27 +02:00
Mark Simulacrum dcfe311da8
Rollup merge of #51302 - Mark-Simulacrum:rustdoc-fast, r=QuietMisdreavus
Permit building rustdoc without compiler artifacts

None
2018-06-02 13:14:28 -06:00
Mark Simulacrum cf24a1df33 Rustdoc itself no longer requires proc macros to build
This avoids a full compiler build in order to build and/or run tests for
rustdoc.
2018-06-02 09:32:22 -06:00
Johannes Nixdorf a8be9bdd7b Use builder.cargo() for cargo-vendor.
This makes it go through boostrap/bin/rustc.rs, so it will use
-crt-static if needed.
2018-05-31 12:03:29 +02:00
Johannes Nixdorf ff8f226cab builder.cargo(): don't add "--target"/"--release" to cargo install
This is required to use builder.cargo for cargo-vendor.
2018-05-31 12:03:29 +02:00
Johannes Nixdorf 55dab7c820 bootstrap: pass crt-static for the compiler host as well 2018-05-31 12:01:50 +02:00
Johannes Nixdorf bcab14af3e bootstrap.py: respect crt-static
Bootstrap requires serde_derive, which needs proc-macro crate types, so
it won't work with crt-static.
2018-05-31 12:01:50 +02:00
Santiago Pastorino b39a1d6f1a
Run rustfmt 2018-05-30 14:36:23 -03:00
Santiago Pastorino b970feedc2
Add compare-mode to x.py 2018-05-30 14:35:43 -03:00
bors d0456c6f8f Auto merge of #50892 - davidtwco:issue-50004, r=alexcrichton
Added rustdoc documentation to compiler docs.

Fixes #50004.

r? @alexcrichton
(since you reviewed the last PR about compiler docs)
2018-05-28 01:28:14 +00:00
kennytm 0bb7335cb8
Rollup merge of #50864 - jakllsch:add-netbsd-arm-target-specs, r=alexcrichton
Add NetBSD/arm target specs
2018-05-24 16:02:37 +08:00
kennytm 28e43582a3
Rollup merge of #50961 - Zoxc:fix-filecheck, r=alexcrichton
Fix FileCheck finding with MSVC
2018-05-23 00:26:22 +08:00
steveklabnik 292be70f9d build the 2018 edition 2018-05-22 11:30:15 -04:00
John Kåre Alsaker e44d804f7d Fix FileCheck finding 2018-05-22 07:37:57 +02:00
David Wood 52b83d7e26
Added rustdoc documentation step outputting into compiler documentation. 2018-05-20 19:34:37 +01:00
bors 8319ef5b78 Auto merge of #50709 - alexcrichton:revert-musl, r=sfackler
Revert #50105 until regression is fixed

Discovered at https://github.com/rust-lang/rust/pull/50105#issuecomment-388630750 it looks like this caused a regression with i686 musl, so let's revert in the meantime while a fix is worked out
2018-05-19 03:10:53 +00:00
Jonathan A. Kollasch ec779b9f08 Add armv6-unknown-netbsd-eabihf target 2018-05-18 09:29:58 -05:00
Jonathan A. Kollasch 908230ee6d Add armv7-unknown-netbsd-eabihf target 2018-05-18 09:29:58 -05:00
Mark Simulacrum f83e4d7407
Rollup merge of #50806 - oli-obk:gesundheit, r=ehuss
Add `bless` x.py subcommand for easy ui test replacement

fixes #49815

r? @nikomatsakis
2018-05-17 13:51:26 -06:00
Alex Crichton acc874fbcd Revert "bootstrap.py: respect crt-static"
This reverts commit 5ecf29df05.
2018-05-17 10:37:22 -07:00
Alex Crichton 4ac82b4946 Revert "bootstrap: pass crt-static for the compiler host as well"
This reverts commit ec2b861c2f.
2018-05-17 10:37:22 -07:00
bors 90463a6bdc Auto merge of #50629 - Mark-Simulacrum:stage-step, r=alexcrichton
Switch to bootstrapping from 1.27

It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.
2018-05-17 16:44:38 +00:00
Mark Simulacrum a22af69c8f Remove MAKEFLAGS to prevent accidental inheritance 2018-05-17 08:47:25 -06:00
Mark Simulacrum 1ae3cff1eb Fix rustc binary metadata overwriting librustc metadata
In #49289, rustc was changed to emit metadata for binaries, which made
it so that the librustc.rmeta file created when compiling librustc was
overwritten by the rustc-main compilation. This commit renames the
rustc-main binary to avoid this problem.

https://github.com/rust-lang/cargo/issues/5524 has also been filed to
see if Cargo can learn to warn on this situation instead of leaving it
for the user to debug.
2018-05-17 08:47:25 -06:00
Mark Simulacrum 47f88e17ab Rename rustdoc to use underscores 2018-05-17 08:47:25 -06:00
Mark Simulacrum 9e3432447a Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00
Oliver Schneider 0356a61948 Fix selftests 2018-05-17 16:03:59 +02:00
Oliver Schneider ceed8eb89c Make `bless` a flag instead of a subcommand 2018-05-17 16:03:59 +02:00
Oliver Schneider 37dee69dac Add `bless` x.py subcommand for easy ui test replacement 2018-05-17 16:03:59 +02:00
Irina Popa b63d7e2b1c Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
kennytm e4f8132a32
Rollup merge of #50789 - cuviper:bootstrap-metadata, r=alexcrichton
Ensure libraries built in stage0 have unique metadata

Issue #50786 shows a case with local rebuild where the libraries built
by stage0 had the same suffix as stage0's own, and were accidentally
loaded by that stage0 rustc when compiling `librustc_trans`.

Now we set `__CARGO_DEFAULT_LIB_METADATA` to "bootstrap" during stage0,
rather than the release channel like usual, so the library suffix will
always be completely distinct from the stage0 compiler.
2018-05-17 05:18:17 +08:00
kennytm 9ced69dd57
Rollup merge of #50787 - ehuss:fix-run-make-wasm, r=alexcrichton
Fix run-make wasm tests

Fixes #50711
2018-05-17 05:18:14 +08:00
Josh Stone e8e5eb58c0 Ensure libraries built in stage0 have unique metadata
Issue #50786 shows a case with local rebuild where the libraries built
by stage0 had the same suffix as stage0's own, and were accidentally
loaded by that stage0 rustc when compiling `librustc_trans`.

Now we set `__CARGO_DEFAULT_LIB_METADATA` to "bootstrap" during stage0,
rather than the release channel like usual, so the library suffix will
always be completely distinct from the stage0 compiler.
2018-05-15 17:48:02 -07:00
Eric Huss a90a963265 Fix run-make wasm tests
Fixes #50711
2018-05-15 16:39:21 -07:00
Oliver Schneider 0370c38895
Don't inject clippy into the rls anymore 2018-05-15 11:34:24 +02:00
bors 0cd465087d Auto merge of #50105 - mixi:crt-included, r=alexcrichton
Use the correct crt*.o files when linking musl targets.

This is supposed to support optionally using the system copy of musl
libc instead of the included one if supported. This currently only
affects the start files, which is enough to allow building rustc on musl
targets.

Most of the changes are analogous to crt-static.

Excluding the start files is something musl based distributions usually patch into their copy of rustc:
  - https://github.com/alpinelinux/aports/blob/eb064c8/community/rust/musl-fix-linux_musl_base.patch
  - https://github.com/voidlinux/void-packages/blob/77400fc/srcpkgs/rust/patches/link-musl-dynamically.patch

For third-party distributions that not yet carry those patches it would be nice if it was supported without the need to patch upstream sources.

## Reasons
### What breaks?
Some start files were missed when originally writing the logic to swap in musl start files (gcc comes with its own start files, which are suppressed by -nostdlib, but not manually included later on). This caused #36710, which also affects rustc with the internal llvm copy or any other system libraries that need crtbegin/crtend.

### How is it fixed?
The system linker already has all the logic to decide which start files to include, so we can just defer to it (except of course if it doesn't target musl).

### Why is it optional?
In #40113 it was first tried to remove the start files, which broke compiling musl-targeting static binaries with a glibc-targeting compiler. This is why it eventually landed without removing the start files. Being an option side-steps the issue.

### Why are the start files still installed?
This has the nice side-effect, that the produced rust-std-* binaries can still be used by on a glibc-targeting system with a rustc built against glibc.

## Does it work?
With the following build script (using [musl-cross-make](https://github.com/richfelker/musl-cross-make)): https://shadowice.org/~mixi/rust-musl/build.sh, I was able to cross-compile a musl-host musl-targeting rustc on a glibc-based system. The resulting binaries are at https://shadowice.org/~mixi/rust-musl/binaries/. This also requires #50103 and #50104 (which are also applied to the branch the build script uses).
2018-05-11 19:46:16 +00:00
bors 57dc98434e Auto merge of #50200 - alexcrichton:compile-with-clang, r=kennytm
Compile LLVM with Clang on release builders

Attempting to cache in on some rustc compile time wins mentioned in https://github.com/rust-lang/rust/issues/49879#issuecomment-383602941
2018-05-10 10:30:02 +00:00
bors 95d0b9e967 Auto merge of #49729 - collin5:b48483, r=Mark-Simulacrum
./x.py test should be able to run individual tests

Allows user to be able to run individual tests by specifying filename i.e `./x.py test src/test/run-pass/foo.rs`

Fixes #48483
2018-05-10 02:15:40 +00:00
Alex Crichton 7e5b9ac41e ci: Compile LLVM with Clang 6.0.0
Currently on CI we predominately compile LLVM with the default system compiler
which means gcc on Linux, some version of Clang on OSX, MSVC on Windows, and
gcc on MinGW. This commit switches Linux, OSX, and Windows to all use Clang
6.0.0 to build LLVM (aka the C/C++ compiler as part of the bootstrap). This
looks to generate faster code according to #49879 which translates to a faster
rustc (as LLVM internally is faster)

The major changes here were to the containers that build Linux releases,
basically adding a new step that uses the previous gcc 4.8 compiler to compile
the next Clang 6.0.0 compiler. Otherwise the OSX and Windows scripts have been
updated to download precompiled versions of Clang 6 and configure the build to
use them.

Note that `cc` was updated here to fix using `clang-cl` with `cc-rs` on MSVC, as
well as an update to `sccache` on Windows which was needed to correctly work
with `clang-cl`. Finally the MinGW compiler is entirely left out here
intentionally as it's currently thought that Clang can't generate C++ code for
MinGW and we need to use gcc, but this should be verified eventually.
2018-05-09 14:45:34 -07:00
Collins Abitekaniza 2f8c2a93bf ignore test-args if user specifies suite_path 2018-05-09 03:24:03 +03:00
Collins Abitekaniza 41ee6fe147 ./x.py test should be able to run individual tests
trim and pass relative test paths as test-args

use collect for getting test_args

move suite_path to ShouldRun and make Option

append existing args to test_args

use enum for PathSet

handle Suites differently from Paths

Error out if part of test suite but not file

refactor, make requested changes
2018-05-07 16:51:58 +03:00
bors c88992d001 Auto merge of #50000 - michaelwoerister:cross-lang-lto, r=alexcrichton
Add some groundwork for cross-language LTO.

Implements part of #49879:
- Adds a `-Z cross-lang-lto` flag to rustc
- Makes sure that bitcode is embedded in object files if the flag is set.

This should already allow for using cross language LTO for staticlibs (where one has to invoke the linker manually anyway). However, `rustc` will not try to enable LTO for its own linker invocations yet.

r? @alexcrichton
2018-05-07 08:41:07 +00:00
bors 700165d7ae Auto merge of #50468 - nrc:test-rustfmt, r=alexcrichton
Pass a test directory to rustfmt

Another attempt to fix the rustfmt tests. `RUSTFMT_TEST_DIR` is consumed by Rustfmt in the latext commit (thus the Rustfmt update) because we need a place to create temp files that won't be read-only.

r? @alexcrichton
2018-05-06 22:29:01 +00:00
bors 6f721f54c6 Auto merge of #50466 - kennytm:rustbuild-stage0-lib-test, r=Mark-Simulacrum
rustbuild: Allow quick testing of libstd and libcore at stage0

This PR implemented two features:

1. Added a `--no-doc` flag to allow testing a crate *without* doc tests. In this mode, we don't need to build rustdoc, and thus we can skip building the stage2 compiler. (Ideally stage0 test should use the bootstrap rustdoc, but I don't want to mess up the core builder logic here)

2. Moved all libcore tests externally and added a tidy test to ensure we don't accidentally add `#[test]` into libcore.

After this PR, one could run `./x.py test --stage 0 --no-doc src/libstd` to test `libstd` without building the compiler, thus enables us to quickly test new library features.
2018-05-06 06:33:53 +00:00
Nick Cameron df97dd1d05 Pass a test directory to rustfmt 2018-05-06 08:39:37 +12:00
kennytm 05af55bd80
s/DocTestsOption/DocTests/g 2018-05-06 03:30:42 +08:00
kennytm 169f58b712
Added some simple documentation. 2018-05-06 03:29:19 +08:00
bors 24c5f153fd Auto merge of #50276 - Zoxc:build-cleanup, r=alexcrichton
Misc tweaks

This:
- ~~Add explicit dependencies on `getops`~~
- Fixes the libtest-json test when `RUST_BACKTRACE=1` is set
- ~~Sets `opt-level` to `3`~~
- Removes the use of `staged_api` from `rustc_plugin`
- ~~Enables the Windows Error Reporting dialog when running rustc during bootstrapping~~
- Disables Windows Error Reporting dialog when running compiletest tests
- Enables backtraces when running rustc during bootstrapping
- ~~Removes the `librustc` dependency on `libtest`~~
- Triggers JIT debugging on Windows if rustc panics during bootstrapping

r? @alexcrichton
2018-05-05 18:58:17 +00:00
John Kåre Alsaker e24cbe2da0 Misc tweaks 2018-05-05 20:36:46 +02:00
kennytm be9d6690b2
Added test case. 2018-05-06 02:34:07 +08:00
kennytm 1733f5e1c0
Added `./x.py test --no-doc` option.
This enables `./x.py test --stage 0 src/libstd --no-doc` and ensures the
stage2-rustc and rustdoc need to be built.
2018-05-06 01:27:22 +08:00
Michael Woerister d0253ad724 bootstrap: Fix LLVM bin path setup for Windows. 2018-05-04 03:20:29 -07:00
Harm Berntsen 80f1912d83
Add eabi suffix to armv5te musl target 2018-05-04 08:47:24 +02:00
Harm Berntsen b71f6364d2
Add armv5te-unknown-linux-musl target 2018-05-03 16:53:04 +02:00
Michael Woerister a21fb3f8da Make run-make host_test!(). 2018-05-03 02:30:15 -07:00
Michael Woerister 54b0e07061 Add LLVM bin directory to PATH for running run-make tests. 2018-05-03 02:30:14 -07:00
Vadim Petrochenkov 993f7c5715 rustbuild: Normalize paths coming from Python slightly
Fixes #49785
2018-05-01 21:25:38 +03:00
Johannes Nixdorf ec2b861c2f bootstrap: pass crt-static for the compiler host as well 2018-04-29 11:30:56 +02:00
Johannes Nixdorf 5ecf29df05 bootstrap.py: respect crt-static
Bootstrap requires serde_derive, which needs proc-macro crate types, so
it won't work with crt-static.
2018-04-29 11:30:56 +02:00
kennytm d403d82b0a
Rollup merge of #49707 - steveklabnik:rustc-book, r=QuietMisdreavus
Add "the Rustc book"

This PR introduces a new book into the documentation, "The rustc book". We already have books for Cargo, and for Rustdoc, rustc should have some too. This book is focused on *users* of rustc, and provides a nice place to write documentation for users.

I haven't put content here, but plan on scaffolding it out very soon, and wanted this PR open for a few discussions first. One of those is "what exactly should said TOC be?" I plan on having a proposed one up tomorrow, but figured I'd let people know to start thinking about it now.

The big one is that we also will want to put https://github.com/rust-lang-nursery/rustc-guide in-tree as well, and the naming is... tough. I'm proposing:

* doc.rust-lang.org/rustc is "The Rustc book", to mirror the other tools' books.
* doc.rust-lang.org/rustc-contribution is "The Rustc contribution guide", and contains that book

@nikomatsakis et al, any thoughts on this? I'm not attached to it in particular, but had to put something together to get this discussion going. I think mirroring the other tools is a good idea for this work, but am not sure where exactly that leaves yours.

Fixes https://github.com/rust-docs/team/issues/11
2018-04-27 14:16:42 +08:00
bors 0cbd310fa7 Auto merge of #50123 - kennytm:do-not-test-rls-if-build-failed, r=alexcrichton
Do not test RLS/Rustfmt if build failed
2018-04-22 08:48:32 +00:00
bors b78853b6fd Auto merge of #50056 - alexcrichton:update-cargo, r=Mark-Simulacrum
Update the Cargo submodule
2018-04-21 00:50:12 +00:00
kennytm 27d9691d80
Do not test RLS and rustfmt if build of these failed.
Avoid a tool being simultaneously test-pass and build-fail.
2018-04-21 00:53:36 +08:00
kennytm a543dbf620
Rollup merge of #50104 - mixi:libxml2-llvm, r=alexcrichton
Disable auto-detection of libxml2 when compiling llvm.

This broke cross-compiling rustc with internal llvm (with both the host and target being executable on the machine), because llvm's build system detected libxml2 on the host, therefore auto-enabled libxml2 support, but wouldn't compile as the target didn't have libxml2 installed.
2018-04-20 23:45:42 +08:00
Alex Crichton 924f8c7053 Update the Cargo submodule 2018-04-20 07:18:35 -07:00
Johannes Nixdorf b92e6c3de0 Disable auto-detection of libxml2 when compiling llvm. 2018-04-20 11:07:24 +02:00
varkor 261da7108d Ensure CleanTools is run for check rustdoc 2018-04-19 19:20:55 +01:00
varkor baf940d580 Add rustdoc to x.py check
This can often encounter errors after modifying rustc, so it's useful to include it in the steps that are checked.
2018-04-19 19:06:34 +01:00
bors 8a28d94ea1 Auto merge of #49900 - pnkfelix:compare-mode-nll-followup-3, r=nikomatsakis
Add src/test/ui regression testing for NLL

This PR changes `x.py test` so that when you are running the `ui` test suite, it will also always run `compiletest` in the new `--compare-mode=nll`, which just double-checks that when running under the experimental NLL mode, the output matches the `<source-name>.nll.stderr` file, if present.

In order to reduce the chance of a developer revolt in response to this change, this PR also includes some changes to make the `--compare-mode=nll` more user-friendly:

 1. It now generates nll-specific .stamp files, and uses them (so that repeated runs can reuse previously cached results).
 2. Each line of terminal output distinguishes whether we are running under `--compare-mode=nll` by printing with the prefix `[ui (nll)]` instead of just the prefix `[ui]`.

Subtask of rust-lang/rust#48879
2018-04-19 11:13:10 +00:00
bors 78fc510743 Auto merge of #49890 - varkor:xpy-check-rustc_trans, r=alexcrichton
Add rustc_trans to x.py check

r? @Mark-Simulacrum

I looked at `bootstrap/compile.rs` and `bootstrap/check.rs` to try to work out which steps were appropriate, but I'm sure I've overlooked some details here, so it's worth checking carefully I've got all the steps right (e.g. I wasn't sure whether we want to build LLVM if necessary with `x.py check`, though I thought it was probably better to than to not).

From a quick test, it seems to be working, though.
2018-04-19 06:19:27 +00:00
bors e0f9b32357 Auto merge of #50022 - nrc:doc-analysis, r=mark-simulacrum
Only emit save-analysis data for `cargo build` tasks

Previously, we were emittinng analysis data for all tasks, including `doc`. That meant we got two sets of save-analysis data, one from the normal build and one from the docs. That means indexing with the RLS took twice as long and made downloads larger and build times longer.

cc https://github.com/rust-lang-nursery/rls/issues/826

r? @Mark-Simulacrum
2018-04-18 22:30:00 +00:00
Felix S. Klock II 5589550356 Expand `x.py test` to also run with `--compare-mode=nll` on src/test/ui suite. 2018-04-18 14:47:24 +02:00
varkor 84f52a7162 Replace Build with Builder 2018-04-18 10:56:04 +01:00
varkor 1db9fabdf7 Do not rebuild LLVM for x.py check 2018-04-18 10:49:00 +01:00
varkor f31c01c713 Abstract LLVM building from bootstrap
This deduplicates the LLVM building functionality from compile.rs and check.rs.
2018-04-18 10:49:00 +01:00
varkor 49b677346f Correct the timestamp for CodegenBackend check 2018-04-18 10:44:47 +01:00
varkor b53468f500 Add rustc_trans to x.py check 2018-04-18 10:44:09 +01:00
Mark Simulacrum be1e7893d5 Remove uses of Build across Builder steps 2018-04-17 19:50:50 -06:00
Nick Cameron de34735ab2 Only emit save-analysis data for `cargo build` tasks
Previously, we were emittinng analysis data for all tasks, including `doc`. That meant we got two sets of save-analysis data, one from the normal build and one from the docs. That means indexing with the RLS took twice as long and made downloads larger and build times longer.

cc https://github.com/rust-lang-nursery/rls/issues/826
2018-04-17 21:35:10 +12:00
bors 8728c7a726 Auto merge of #49542 - GuillaumeGomez:intra-link-resolution-error, r=GuillaumeGomez
Add warning if a resolution failed

r? @QuietMisdreavus
2018-04-17 09:02:03 +00:00
bors 94516c5038 Auto merge of #50012 - Zoxc:msvc-fix, r=Mark-Simulacrum
Don't look for cc/cxx when testing with bogus targets

This fixes test builds on Windows.

r? @Mark-Simulacrum
2018-04-17 01:41:43 +00:00
John Kåre Alsaker 52e1c84732 Don't look for cc/cxx when testing with bogus targets 2018-04-17 01:59:00 +02:00
Guillaume Gomez a3ed2abed7 Fix empty tests 2018-04-16 23:37:11 +02:00
Guillaume Gomez 16a39382e2 Fix nits 2018-04-16 23:37:11 +02:00
Guillaume Gomez b2192ae157 Add rustdoc-ui test suite 2018-04-16 23:37:11 +02:00
Guillaume Gomez 035ec5bbb6 Add warning if a resolution failed 2018-04-16 23:33:43 +02:00
kennytm 34ee31d6f2
Rollup merge of #49959 - cuviper:debuginfo-tools, r=Mark-Simulacrum
rustbuild: allow building tools with debuginfo

Debugging information for the extended tools is currently disabled for
concerns about the size.  This patch adds `--enable-debuginfo-tools` to
let one opt into having that debuginfo.

This is useful for debugging the tools in distro packages.  We always
strip debuginfo into separate packages anyway, so the extra size is not
a concern in regular use.
2018-04-17 03:34:31 +08:00
kennytm e681ba22d2
Rollup merge of #49922 - f-bro:zmiri, r=oli-obk
Remove -Zmiri debugging option
2018-04-14 15:23:37 +08:00
kennytm 44a71e2e61
Rollup merge of #49908 - chrisccoulson:fix-rustdoc-themes-test-without-rpath, r=Mark-Simulacrum
Fix test failure in src/tools/rustdoc-themes when rust.rpath = false

See https://github.com/rust-lang/rust/issues/49907
2018-04-14 15:22:39 +08:00
kennytm 15eb465b35
Rollup merge of #49465 - ollie27:rustbuild_test_docs, r=steveklabnik,QuietMisdreavus,frewsxcv,GuillaumeGomez
Add docs for the test crate with the std docs

If the compiler docs aren't going to include the test crate then it may as well be included with std.

Fixes #49388
2018-04-14 15:22:17 +08:00
kennytm c22b4db0f5
Rollup merge of #49876 - oli-obk:no_secret_clippy_on_stable_☹, r=nrc
Don't inject clippy into rls on stable/beta

as discussed at the all-hands
2018-04-14 15:22:06 +08:00
Josh Stone 93734e9c46 Make debuginfo-tools always default false 2018-04-13 21:58:21 -07:00
Josh Stone bc7403d067 Avoid specific claims about debuginfo size 2018-04-13 21:57:53 -07:00
Josh Stone cc2906cb26 rustbuild: allow building tools with debuginfo
Debugging information for the extended tools is currently disabled for
concerns about the size.  This patch adds `--enable-debuginfo-tools` to
let one opt into having that debuginfo.

This is useful for debugging the tools in distro packages.  We always
strip debuginfo into separate packages anyway, so the extra size is not
a concern in regular use.
2018-04-13 16:52:54 -07:00
Fabio B 35087fcb89 Remove -Z miri debugging option 2018-04-13 09:43:10 +02:00
Chris Coulson 6f10146f9f Fix test failure in src/tools/rustdoc-themes when rust.rpath = false 2018-04-12 15:01:49 +01:00
Oliver Schneider 34956c8e8e
Don't inject clippy into rls on stable/beta 2018-04-11 14:56:59 +02:00
kennytm 4dbca4c8ac
Rollup merge of #49809 - Mark-Simulacrum:no-color-for-dumb, r=alexcrichton
Stop emitting color codes on TERM=dumb

These terminals generally don't support color.

Fixes #49191

cc @nikomatsakis

r? @alexcrichton
2018-04-11 19:56:48 +08:00
bors 43e994c8b8 Auto merge of #49715 - Mark-Simulacrum:deny-warnings, r=alexcrichton
Move deny(warnings) into rustbuild

This permits easier iteration without having to worry about warnings
being denied.

Fixes #49517
2018-04-11 03:30:04 +00:00
steveklabnik b99418d4b0 Add rustc book to the build system 2018-04-09 14:04:10 -04:00
Mark Simulacrum d326bebf91 Stop emitting color codes on TERM=dumb
These terminals generally don't support color.

Fixes #49191
2018-04-09 11:39:55 -06:00
bors 561fb39559 Auto merge of #49778 - tamird:install-relative-prefix, r=Mark-Simulacrum
rustbuild: canonicalize prefix `install_sh`

Testing:
```
  $ git diff
  diff --git a/config.toml.example b/config.toml.example
  index 9dd3002506..b47bc490cd 100644
  --- a/config.toml.example
  +++ b/config.toml.example
  @@ -196,7 +196,7 @@
   [install]

   # Instead of installing to /usr/local, install to this path instead.
  -#prefix = "/usr/local"
  +prefix = "install-prefix"

   # Where to install system configuration files
   # If this is a relative path, it will get installed in `prefix` above
  $ mkdir install-prefix
  $ ./x.py install -i --stage 0 --config config.toml.example
  ...
  $ ls install-prefix/
  bin	lib	share
```

Closes #36989.

r? @Mark-Simulacrum
2018-04-09 06:05:49 +00:00
Mark Simulacrum c115cc655c Move deny(warnings) into rustbuild
This permits easier iteration without having to worry about warnings
being denied.

Fixes #49517
2018-04-08 16:59:14 -06:00
Tamir Duberstein 94879023ad
rustbuild: canonicalize prefix `install_sh`
Testing:
```
  $ git diff
  diff --git a/config.toml.example b/config.toml.example
  index 9dd3002506..b47bc490cd 100644
  --- a/config.toml.example
  +++ b/config.toml.example
  @@ -196,7 +196,7 @@
   [install]

   # Instead of installing to /usr/local, install to this path instead.
  -#prefix = "/usr/local"
  +prefix = "install-prefix"

   # Where to install system configuration files
   # If this is a relative path, it will get installed in `prefix` above
  $ mkdir install-prefix
  $ ./x.py install -i --stage 0 --config config.toml.example
  ...
  $ ls install-prefix/
  bin	lib	share
```

Closes #36989.
2018-04-08 18:57:59 -04:00
bors 12f1ae60a9 Auto merge of #49774 - danc86:configure.py-tools, r=alexcrichton
configure.py --tools should set a list instead of a string

Currently the --tools option does not work because it is setting a string value
for 'build.tools'. It should be a list of strings instead.
2018-04-08 21:40:44 +00:00
bors b7da1aaff6 Auto merge of #49771 - tamird:incremental-no-stage-1, r=Mark-Simulacrum
Don't default to stage 1 with incremental

Closes #43177.

r? @Mark-Simulacrum
2018-04-08 19:11:47 +00:00
bors 7327d9d0e2 Auto merge of #49759 - ollie27:rustbuild_cargo, r=Mark-Simulacrum
rustbuild: Fix setting initial cargo

Fixes #49741

r? @Mark-Simulacrum
2018-04-08 16:44:22 +00:00
Dan Callaghan 51b17db770
configure.py --tools should set a list instead of a string
Currently the --tools option does not work because it is setting a string value
for 'build.tools'. It should be a list of strings instead.
2018-04-08 14:59:15 +10:00
Tamir Duberstein b204b498c5
Don't default to stage 1 with incremental
Closes #43177.
2018-04-07 22:32:21 -04:00
Oliver Middleton ccc049d547 rustbuild: Fix setting initial cargo 2018-04-07 15:10:36 +01:00
bors 8c2d7b2da3 Auto merge of #49661 - alexcrichton:bump-bootstrap, r=nikomatsakis
Bump the bootstrap compiler to 1.26.0 beta

Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-07 11:58:38 +00:00
Tatsuyuki Ishi 4c51d47269
bootstrap: Remove the fast path
This is rarely noticed, but when you have old submodules, not updating them will cause you run into https://github.com/rust-lang/cargo/issues/4678.
2018-04-06 16:23:53 +09:00
Alex Crichton 8958815916 Bump the bootstrap compiler to 1.26.0 beta
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-05 07:13:45 -07:00
kennytm 84f6440d79
Rollup merge of #49654 - davidtwco:issue-29893, r=alexcrichton
Host compiler documentation: Include private items

Fixes #29893. Now that compiler documentation is being hosted, including private items seems sensible as these types are going to be being used by contributors working on the compiler.

However, including this means that doc comments that contain codeblocks with invalid Rust and can fail the documenting of a given crate (as evidenced by the changes in the second commit included in this PR). We'd need some way of ensuring that this cannot happen so that these failures don't cause documenting to fail. I'm unsure whether this change to documentation steps will cause this to happen already or if something new will be required.

r? @alexcrichton
2018-04-05 18:37:28 +08:00
kennytm b146e33518
Rollup merge of #49563 - japaric:std-thumb, r=alexcrichton
add a dist builder to build rust-std components for the THUMB targets

the rust-std component only contains the core and compiler-builtins (+c +mem) crates

cc #49382

- I'm not entirely sure if this PR alone will produce rust-std components installable by rustup or if something else needs to be changed
- I could have done the THUMB builds in an existing builder / image; I wasn't sure if that was a good idea so I added a new image
- I could build other crates like alloc into the rust-std component but, AFAICT, that would require calling Cargo a second time (one for alloc and one for compiler-builtins), or have alloc depend on compiler-builtins (#49503 will perform that change) *and* have alloc resurface the "c" and "mem" Cargo features.

r? @alexcrichton
2018-04-05 18:37:25 +08:00
Jorge Aparicio b1015f5c5a compile other no-std crates 2018-04-04 22:42:56 +02:00
Jorge Aparicio bca569f57c Revert "create a nostd crate"
This reverts commit 14768f9b63.
2018-04-04 22:23:33 +02:00
Jorge Aparicio 14768f9b63 create a nostd crate
the goal is to build, in a single Cargo invocation, several no-std crates that we want to put in the
rust-std component of no-std targets. The nostd crate builds these crates:

- core
- compiler-builtin (with the "c" and "mem" features enabled)
- alloc
- std_unicode
2018-04-04 19:24:57 +02:00
David Wood 9e9a987a02
Documenting private items in compiler docs. 2018-04-04 16:09:01 +01:00
Mark Simulacrum 184d3bca6c Stop checking that the graph produced by a dry run is equivalent
This is too likely to cause spurious bounces on CI; what we run may be
dependent on what ran successfully before hand (e.g. RLS features with
Clippy), which makes this not tenable. There's no good way to ignore
specifically these problematic steps so we'll just ignore everything for
the time being. We still test that a dry run worked though so largely
this is the same from a ensure-that-tests-work perspective.

Eventually we'll want to undo this commit, though, to make our tests
more accurate.
2018-04-03 11:43:14 -06:00
Mark Simulacrum 0ce5cf0697 Fix a few accidental expectations 2018-04-03 11:43:14 -06:00
Mark Simulacrum 545b92f46d Avoid printing output when in dry run mode 2018-04-03 11:43:14 -06:00
Mark Simulacrum a727447f59 Refactor to use a dry-run config instead of cfg(test)
This ensures that each build will support the testing design of "dry
running" builds. It's also checked that a dry run build is equivalent
step-wise to a "wet" run build; the graphs we generate when running are
directly compared node/node and edge/edge, both for order and contents.
2018-04-03 11:43:14 -06:00
Mark Simulacrum b0dbc7c15d Implement generating graphs of the build steps 2018-04-03 11:43:12 -06:00
Mark Simulacrum f4620a3d14 Stub out less code 2018-04-03 11:41:51 -06:00
Mark Simulacrum 42fde21c27 Add tests to rustbuild
In order to run tests, previous commits have cfg'd out various parts of
rustbuild. Generally speaking, these are filesystem-related operations
and process-spawning related parts. Then, rustbuild is run "as normal"
and the various steps that where run are retrieved from the cache and
checked against the expected results.

Note that this means that the current implementation primarily tests
"what" we build, but doesn't actually test that what we build *will*
build. In other words, it doesn't do any form of dependency verification
for any crate. This is possible to implement, but is considered future
work.

This implementation strives to cfg out as little code as possible; it
also does not currently test anywhere near all of rustbuild. The current
tests are also not checked for "correctness," rather, they simply
represent what we do as of this commit, which may be wrong.

Test cases are drawn from the old implementation of rustbuild, though
the expected results may vary.
2018-04-03 11:41:50 -06:00
Mark Simulacrum 8fd42ec130 Extract default Config into function
Will permit creating Config in tests without having to parse a toml
file.
2018-04-03 11:39:16 -06:00
Mark Simulacrum fde70b0963 Make test steps sortable
Ensures that test cases will be somewhat easier to write.
2018-04-03 11:39:16 -06:00
Mark Simulacrum cd33d3a0e4 Stub out various functions during testing 2018-04-03 11:39:16 -06:00
Mark Simulacrum e7342b8f42 Permit constructing Build without executing 2018-04-03 11:39:16 -06:00
Mark Simulacrum a5e56b62c5 Permit constructing Builder without executing 2018-04-03 11:39:16 -06:00
Mark Simulacrum 84b5b34021 Stop accessing current_dir in bootstrap
This ensures that the working directory of rustbuild has no effect on
it's run; since tests will run with a different cwd this is required for
consistent behavior.
2018-04-03 11:39:15 -06:00
Jorge Aparicio 862c839fb9 extend no-std-ness check to all *-none-* targets 2018-04-03 08:29:09 +02:00
Alex Crichton e9d898318c Bump to 1.27.0
Also update some `Cargo.lock` dependencies, finishing up some final steps of our
[release process]!

This doesn't update the bootstrap compiler just yet but that will come in a
follow-up PR.

[release process]: https://forge.rust-lang.org/release-process.html
2018-04-02 12:42:44 -07:00
Jorge Aparicio 68b54a5f43 add a dist-thumb builder to build rust-std for the THUMB targets
the rust-std component only contains the core and compiler-builtins (+c +mem) crates

cc #49382
2018-04-01 18:50:21 +02:00
Mark Simulacrum 36f9f76356
Rollup merge of #49549 - Mark-Simulacrum:bootstrap-cleanup, r=alexcrichton
Remove filetime dep from build_helper

r? @alexcrichton
2018-04-01 18:04:57 +02:00
Mark Simulacrum 86915ddf30 Remove filetime dep from build_helper 2018-04-01 04:49:21 -06:00
bors 804d8c88d9 Auto merge of #49530 - petrhosek:empty-extra-flags, r=cramertj
Only include space in RUSTFLAGS extra flags if not empty

When the RUSTFLAGS_STAGE_{1,2} is not set, including a space means
the string will always be non-empty and RUSTFLAGS will be always be
reset which breaks other ways of setting these such as through config
in CARGO_HOME.
2018-04-01 05:09:48 +00:00
Petr Hosek c6bae16dc2 Only include space in RUSTFLAGS extra flags if not empty
When the RUSTFLAGS_STAGE_{1,2} is not set, including a space means
the string will always be non-empty and RUSTFLAGS will be always be
reset which breaks other ways of setting these such as through config
in CARGO_HOME.
2018-03-30 19:37:08 -07:00
Petr Hosek a24811e15a Handle fast-submodules option correctly
This option was introduced in 72cb109bec, but it uses two different
spellings (fast-submodule vs fast-submodules) and isn't handled by
Rust bootstrap which means that any attempt to set this flag fails.
2018-03-30 16:42:57 -07:00
Oliver Middleton e719bb048e Add docs for the test crate with the std docs
If the compiler docs aren't going to include the test crate then it may as well be included with std.
2018-03-28 22:49:56 +01:00
Oliver Middleton 77c70a8c47 rustbuild: Don't leak file handles when creating junctions on Windows
This fixes building the compiler docs because stage1-rustc\x86_64-pc-windows-msvc\doc is used twice which
doesn't work if we still have a handle from the first time.
2018-03-28 22:43:23 +01:00
Alex Crichton faebcc1087 rustbuild: Fail the build if we build Cargo twice
This commit updates the `ToolBuild` step to stream Cargo's JSON messages, parse
them, and record all libraries built. If we build anything twice (aka Cargo)
it'll most likely happen due to dependencies being recompiled which is caught by
this check.
2018-03-26 13:07:12 -07:00
Alex Crichton bd28641344 rustbuild: Disable docs on cross-compiled builds
This commit disables building documentation on cross-compiled compilers, for
example ARM/MIPS/PowerPC/etc. Currently I believe we're not getting much use out
of these documentation artifacts and they often take 10-15 minutes total to
build as it requires building rustdoc/rustbook and then also generating all the
documentation, especially for the reference and the book itself.

In an effort to cut down on the amount of work that we're doing on dist CI
builders in light of recent timeouts this was some relatively low hanging fruit
to cut which in theory won't have much impact on the ecosystem in the hopes that
the documentation isn't used too heavily anyway.

While initial analysis in #48827 showed only shaving 5 minutes off local builds
the same 5 minute conclusion was drawn from #48826 which ended up having nearly
a half-hour impact on the bots. In that sense I'm hoping that we can land this
and test out what happens on CI to see how it affects timing.

Note that all tier 1 platforms, Windows, Mac, and Linux, will continue to
generate documentation.
2018-03-25 23:31:41 -07:00
bors 445fafaa4b Auto merge of #49341 - alexcrichton:more-balance, r=kennytm
appveyor: Move run-pass-fulldeps to extra builders

We've made headway towards splitting the test suite across two appveyor builders
and this moves one more tests suite between builders. The last [failed
build][fail] had its longest running test suite and I've moved that to the
secondary builder.

cc #48844

[fail]: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.6782
2018-03-26 02:39:28 +00:00
Alex Crichton 796c78a353 appveyor: Move run-pass-fulldeps to extra builders
We've made headway towards splitting the test suite across two appveyor builders
and this moves one more tests suite between builders. The last [failed
build][fail] had its longest running test suite and I've moved that to the
secondary builder.

cc #48844

[fail]: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.6782
2018-03-24 13:46:57 -07:00
kennytm 177e20de32
Rollup merge of #49290 - cuviper:unextended-dist-rustfmt, r=nikomatsakis
Allow installing rustfmt without config.extended

This assertion was preventing `./x.py install rustfmt` if attempted
without an "extended" build configuration, but it actually builds and
installs just fine.
2018-03-25 01:26:44 +08:00
kennytm 311814a1a9
Rollup merge of #49193 - davidtwco:issue-29893, r=alexcrichton
Host compiler documentation

Fixes #29893. Rust Central Station PR: rust-lang/rust-central-station#40

r? @alexcrichton
2018-03-25 01:26:33 +08:00
kennytm c5264a5932
Rollup merge of #49120 - Zoxc:parallel-ci, r=alexcrichton
Add a CI job for parallel rustc using x.py check

r? @alexcrichton
2018-03-25 01:26:28 +08:00
kennytm 23b4bf924f
Rollup merge of #49089 - alexcrichton:fix-timings, r=Mark-Simulacrum
rustbuild: Tweak where timing information goes

This commit tweaks where timing and step information is printed out as part of
the build, ensuring that we do it as close to the location where work happens as
possible. In rustbuild various functions may perform long blocking work as
dependencies are assembled, so if we print out timing information early on we
may accidentally time more than just the step we were intending to time!
2018-03-25 01:26:27 +08:00
bors 4be5d360cd Auto merge of #49311 - SimonSapin:bootstrap-vs-rustflags-the-return, r=Mark-Simulacrum
Use the same RUSTFLAGS for building and testing `bootstrap`

This avoids recompiling the whole dependency graph twice for every `./x.py test` run.

Fixes #49215
2018-03-23 23:08:13 +00:00
Simon Sapin e993e62341 Use the same RUSTFLAGS for building and testing `bootstrap`
Fixes #49215
2018-03-23 19:55:41 +01:00
Josh Stone 86f7d8939d Allow installing rustfmt without config.extended
This assertion was preventing `./x.py install rustfmt` if attempted
without an "extended" build configuration, but it actually builds and
installs just fine.
2018-03-22 18:31:32 -07:00
David Wood 73fa6d52ed
Remove std/test documentation from compiler docs. 2018-03-22 20:49:05 +00:00
Alex Crichton 7df6f4161c rustc: Add a `#[wasm_custom_section]` attribute
This commit is an implementation of adding custom sections to wasm artifacts in
rustc. The intention here is to expose the ability of the wasm binary format to
contain custom sections with arbitrary user-defined data. Currently neither our
version of LLVM nor LLD supports this so the implementation is currently custom
to rustc itself.

The implementation here is to attach a `#[wasm_custom_section = "foo"]`
attribute to any `const` which has a type like `[u8; N]`. Other types of
constants aren't supported yet but may be added one day! This should hopefully
be enough to get off the ground with *some* custom section support.

The current semantics are that any constant tagged with `#[wasm_custom_section]`
section will be *appended* to the corresponding section in the final output wasm
artifact (and this affects dependencies linked in as well, not just the final
crate). This means that whatever is interpreting the contents must be able to
interpret binary-concatenated sections (or each constant needs to be in its own
custom section).

To test this change the existing `run-make` test suite was moved to a
`run-make-fulldeps` folder and a new `run-make` test suite was added which
applies to all targets by default. This test suite currently only has one test
which only runs for the wasm target (using a node.js script to use `WebAssembly`
in JS to parse the wasm output).
2018-03-22 13:16:38 -07:00
David Wood 1b0e9f5af9
Only generate documentation for local rustc crates. 2018-03-22 17:21:30 +00:00
bors 5092c6b01a Auto merge of #49264 - kennytm:rollup, r=kennytm
Rollup of 23 pull requests

- Successful merges: #48374, #48596, #48759, #48939, #49029, #49069, #49093, #49109, #49117, #49140, #49158, #49188, #49189, #49209, #49211, #49216, #49225, #49231, #49234, #49242, #49244, #49105, #49038
- Failed merges:
2018-03-22 16:58:57 +00:00
kennytm 34eca5346f
Rollup merge of #49209 - Zoxc:run-make-last, r=Mark-Simulacrum
Run the `run-make` tests last, so more tests run on Windows when `make` is unavailable

Just https://github.com/rust-lang/rust/pull/47996 again.

r? @Mark-Simulacrum
2018-03-22 22:43:45 +08:00
bors b176285ba7 Auto merge of #49094 - alexcrichton:print-step-duration, r=kennytm
ci: Print out how long each step takes on CI

This commit updates CI configuration to inform rustbuild that it should print
out how long each step takes on CI. This'll hopefully allow us to track the
duration of steps over time and follow regressions a bit more closesly (as well
as have closer analysis of differences between two builds).

cc #48829
2018-03-22 09:46:06 +00:00
David Wood 178652a298
Add support to rustbuild for a 'rustc docs' component tarball 2018-03-21 19:02:53 +00:00
John Kåre Alsaker 859640a3ca Run the `run-make` tests last, so more tests run on Windows when `make` is unavailable 2018-03-20 15:33:22 +01:00
Alex Crichton 1b5eb17d61 ci: Print out how long each step takes on CI
This commit updates CI configuration to inform rustbuild that it should print
out how long each step takes on CI. This'll hopefully allow us to track the
duration of steps over time and follow regressions a bit more closesly (as well
as have closer analysis of differences between two builds).

cc #48829
2018-03-20 07:17:37 -07:00
John Kåre Alsaker efa9016390 Add a CI job for parallel rustc using x.py check 2018-03-18 17:04:50 +01:00
Maxim Nazarenko 1e73c1d39f rustbuild: Ship libsynchronization
Ship libsynchronization from MinGW
2018-03-18 03:05:00 +02:00
Alex Crichton 6fd4d67819 rustbuild: Tweak where timing information goes
This commit tweaks where timing and step information is printed out as part of
the build, ensuring that we do it as close to the location where work happens as
possible. In rustbuild various functions may perform long blocking work as
dependencies are assembled, so if we print out timing information early on we
may accidentally time more than just the step we were intending to time!
2018-03-17 10:59:41 -07:00
kennytm c78426bfc8
Rollup merge of #49057 - Zoxc:fast-submodules, r=alexcrichton
Faster submodule updating

For the common case when there are no submodules which need updating, this takes 0.48 seconds instead of 47 seconds.

r? @alexcrichton
2018-03-17 17:20:46 +08:00
kennytm a2289dadb0
Rollup merge of #49055 - alexcrichton:ship-more-libs, r=nikomatsakis
rustbuild: Add more MinGW libraries to ship

Closes #49044
2018-03-17 17:20:44 +08:00
kennytm 2a7dac05e7
Rollup merge of #48943 - comex:verbose, r=kennytm
Support extra-verbose builds

- The bootstrap crate currently passes -v to Cargo if itself invoked with -vv.  But Cargo supports -vv (to show build script output), so make bootstrap pass that if itself invoked with -vvv.  (More specifically, pass N '-v's to Cargo if invoked with N+1 of them.)

- bootstrap.py currently tries to pass on up to two '-v's to cargo when building bootstrap, but incorrectly ('-v' is marked as 'store_true', so argparse stores either False or True, ignoring multiple '-v's).  Fix this, allow passing any number of '-v's, and make it consistent with bootstrap's invocation of Cargo (i.e. subtract one from the number of '-v's).

- Also improve bootstrap.py's config.toml 'parsing' to support arbitrary verbosity levels, + allow command line to override it.
2018-03-17 17:20:41 +08:00
bors 8cabda4ce8 Auto merge of #49090 - QuietMisdreavus:test-rustdoc-again, r=Mark-Simulacrum
re-enable testing librustdoc

This was originally put in in https://github.com/rust-lang/rust/pull/44274, but https://github.com/rust-lang/rust/pull/48105 accidentally hid it. This change puts librustdoc unit/doc tests back in the main test listing.

fixes https://github.com/rust-lang/rust/issues/44237 (again)
2018-03-17 03:15:21 +00:00
Oliver Schneider 02ac15cb89
Automatically enable the `clippy` feature of `rls` if clippy builds 2018-03-16 18:24:08 +01:00