Commit Graph

1598 Commits

Author SHA1 Message Date
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