about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2017-03-10Test fixes and rebase conflictsAlex Crichton-1/+1
2017-03-10Rollup merge of #40297 - alexcrichton:fix-submodules, r=brsonAlex Crichton-8/+28
Don't put Cargo into the rustc workspace This causes problems when first cloning and bootstrapping the repository unfortunately, so let's ensure that Cargo sticks around in its own workspace. Because Cargo is a submodule it's not available by default on the inital clone of the rust-lang/rust repository. Normally it's the responsibility of the rustbuild to take care of this, but unfortunately to build rustbuild itself we need to resolve the workspace conflicts. To deal with this we'll just have to ensure that all submodules are in their own workspace, which sort of makes sense anyway as updates to dependencies as bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any case this commit removes Cargo from the global workspace which should resolve the issues that we've been seeing. To actually perform this the `cargo` submodule has been moved to a new `vendor` directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace. Closes https://github.com/rust-lang/rust/issues/40284
2017-03-10Rollup merge of #40277 - rkruppe:llvm-parallel-link-jobs, r=alexcrichtonAlex Crichton-0/+17
rustbuild: expose LLVM_PARALLEL_LINK_JOBS This allows limiting the number of linker jobs to avoid swapping when linking LLVM with debug info.
2017-03-10Rollup merge of #40261 - infinity0:patch-1, r=alexcrichtonAlex Crichton-1/+1
Support armhf abi on 64-bit ARM cpus They report their `uname -m` as armv8l rather than aarch64. Patch originally by Matthias Klose <doko@debian.org>
2017-03-10Rollup merge of #40259 - TimNN:fix-emscripten-tests, r=alexcrichtonAlex Crichton-1/+1
Fix emscripten test detection Without this change `rustbuild` will attempt to run `.js.map` files (if they exist) resulting in lots of sadness. r? @alexcrichton
2017-03-10Don't put Cargo into the rustc workspaceAlex Crichton-8/+28
This causes problems when first cloning and bootstrapping the repository unfortunately, so let's ensure that Cargo sticks around in its own workspace. Because Cargo is a submodule it's not available by default on the inital clone of the rust-lang/rust repository. Normally it's the responsibility of the rustbuild to take care of this, but unfortunately to build rustbuild itself we need to resolve the workspace conflicts. To deal with this we'll just have to ensure that all submodules are in their own workspace, which sort of makes sense anyway as updates to dependencies as bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any case this commit removes Cargo from the global workspace which should resolve the issues that we've been seeing. To actually perform this the `cargo` submodule has been moved to the top directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.
2017-03-10rustbuild: Build documentation for `proc_macro`Alex Crichton-10/+205
This commit fixes #38749 by building documentation for the `proc_macro` crate by default for configured hosts. Unfortunately did not turn out to be a trivial fix. Currently rustbuild generates documentation into multiple locations: one for std, one for test, and one for rustc. The initial fix for this issue simply actually executed `cargo doc -p proc_macro` which was otherwise completely elided before. Unfortunately rustbuild was the left to merge two documentation trees together. One for the standard library and one for the rustc tree (which only had docs for the `proc_macro` crate). Rustdoc itself knows how to merge documentation files (specifically around search indexes, etc) but rustbuild was unaware of this, so an initial fix ended up destroying the sidebar and the search bar from the libstd docs. To solve this issue the method of documentation has been tweaked slightly in rustbuild. The build system will not use symlinks (or directory junctions on Windows) to generate all documentation into the same location initially. This'll rely on rustdoc's logic to weave together all the output and ensure that it ends up all consistent. Closes #38749
2017-03-10Support armhf abi on 64-bit ARM cpusXimin Luo-1/+1
They report their `uname -m` as armv8l rather than aarch64. Patch originally by Matthias Klose <doko@debian.org>
2017-03-09rustbuild: Use copies instead of hard linksAlex Crichton-2/+10
The original motivation for hard links was to speed up the various stages of rustbuild, but in the end this is causing problems on Windows (#39504). This commit tweaks the build system to use copies instead of hard links unconditionally to ensure that the files accessed by Windows are always disjoint. Locally this added .3s to a noop build, so it shouldn't be too much of a regression hopefully!
2017-03-09rustbuild: expose LLVM_PARALLEL_LINK_JOBSRobin Kruppe-0/+17
This allows limiting the number of linker jobs to avoid swapping when linking LLVM with debug info.
2017-03-09fix emscripten test detectionTim Neumann-1/+1
2017-03-05cleanup: remove the *san Cargo features from stdJorge Aparicio-1/+1
these belong to a previous iteration of the sanitizer implementation
2017-03-04Do not purge LLVM build directory on rebuildVadim Petrochenkov-15/+21
Add some comments
2017-03-04Separate "ui-fulldeps" tests from "ui" testsVadim Petrochenkov-2/+4
2017-03-04bootstrap.py: Report build statusVadim Petrochenkov-6/+15
Move some code from x.py to bootstrap.py
2017-03-04Support combination MSVC + NinjaVadim Petrochenkov-1/+1
2017-03-03Auto merge of #39917 - alexcrichton:build-cargo, r=brsonbors-144/+403
rustbuild: Add support for compiling Cargo This commit adds support to rustbuild for compiling Cargo as part of the release process. Previously rustbuild would simply download a Cargo snapshot and repackage it. With this change we should be able to turn off artifacts from the rust-lang/cargo repository and purely rely on the artifacts Cargo produces here. The infrastructure added here is intended to be extensible to other components, such as the RLS. It won't exactly be a one-line addition, but the addition of Cargo didn't require too much hooplah anyway. The process for release Cargo will now look like: * The rust-lang/rust repository has a Cargo submodule which is used to build a Cargo to pair with the rust-lang/rust release * Periodically we'll update the cargo submodule as necessary on rust-lang/rust's master branch * When branching beta we'll create a new branch of Cargo (as we do today), and the first commit to the beta branch will be to update the Cargo submodule to this exact revision. * When branching stable, we'll ensure that the Cargo submodule is updated and then make a stable release. Backports to Cargo will look like: * Send a PR to cargo's master branch * Send a PR to cargo's release branch (e.g. rust-1.16.0) * Send a PR to rust-lang/rust's beta branch updating the submodule * Eventually send a PR to rust-lang/rust's master branch updating the submodule For reference, the process to add a new component to the rust-lang/rust release would look like: * Add `$foo` as a submodule in `src/tools` * Add a `tool-$foo` step which compiles `$foo` with the specified compiler, likely mirroring what Cargo does. * Add a `dist-$foo` step which uses `src/tools/$foo` and the `tool-$foo` output to create a rust-installer package for `$foo` likely mirroring what Cargo does. * Update the `dist-extended` step with a new dependency on `dist-$foo` * Update `src/tools/build-manifest` for the new component.
2017-03-03rustbuild: Add support for compiling CargoAlex Crichton-144/+403
This commit adds support to rustbuild for compiling Cargo as part of the release process. Previously rustbuild would simply download a Cargo snapshot and repackage it. With this change we should be able to turn off artifacts from the rust-lang/cargo repository and purely rely on the artifacts Cargo produces here. The infrastructure added here is intended to be extensible to other components, such as the RLS. It won't exactly be a one-line addition, but the addition of Cargo didn't require too much hooplah anyway. The process for release Cargo will now look like: * The rust-lang/rust repository has a Cargo submodule which is used to build a Cargo to pair with the rust-lang/rust release * Periodically we'll update the cargo submodule as necessary on rust-lang/rust's master branch * When branching beta we'll create a new branch of Cargo (as we do today), and the first commit to the beta branch will be to update the Cargo submodule to this exact revision. * When branching stable, we'll ensure that the Cargo submodule is updated and then make a stable release. Backports to Cargo will look like: * Send a PR to cargo's master branch * Send a PR to cargo's release branch (e.g. rust-1.16.0) * Send a PR to rust-lang/rust's beta branch updating the submodule * Eventually send a PR to rust-lang/rust's master branch updating the submodule For reference, the process to add a new component to the rust-lang/rust release would look like: * Add `$foo` as a submodule in `src/tools` * Add a `tool-$foo` step which compiles `$foo` with the specified compiler, likely mirroring what Cargo does. * Add a `dist-$foo` step which uses `src/tools/$foo` and the `tool-$foo` output to create a rust-installer package for `$foo` likely mirroring what Cargo does. * Update the `dist-extended` step with a new dependency on `dist-$foo` * Update `src/tools/build-manifest` for the new component.
2017-03-03Auto merge of #40152 - eddyb:order-in-rustbuild, r=alexcrichtonbors-8/+21
rustbuild: use deterministic step ordering and respect path order on the command-line. Restores similar behavior to `make` rules, where: * the step order was always the same, e.g. the testsuite order in `make check` * `make check-stage1-{cfail,rpass}` would *always* run `cfail` before `rpass` * `./x.py test--stage 1 src/test/{compile-fail,run-pass}` is now equivalent r? @alexcrichton
2017-02-28rustbuild: sort rules by the order of matching CLI paths.Eduard-Mihai Burtescu-5/+18
2017-02-28rustbuild: use a BTreeMap for the ruleset for determinism.Eduard-Mihai Burtescu-3/+3
2017-02-27travis: Split Android into dist/test imagesAlex Crichton-4/+0
PRs can't land againt beta right now because the android bot is filling up on disk space. I don't really know what's going on but the android bot is the longest one to run anyway so it'll benefit from being split up regardless.
2017-02-25travis: Make more network requests retryableAlex Crichton-0/+2
This commit attempts to move more network operations to being retryable through various operations. For example git submodule updates, downloading snapshots, etc, are now all in retryable steps. Hopefully this commit can cut down on the number of network failures we've been seeing!
2017-02-25Rollup merge of #40019 - alexcrichton:fix-musl, r=brsonEduard-Mihai Burtescu-11/+0
travis: Compile a more compatible libc.a for musl The mitigations for #34978 involve passing `-Wa,-mrelax-relocations=no` to all C code we compile, and we just forgot to pass it when compiling musl itself. Closes #39979
2017-02-25Rollup merge of #39950 - ishitatsuyuki:stop-trashing-ldpath, r=alexcrichtonEduard-Mihai Burtescu-2/+6
bootstrap: stop trashing (DY)LD_LIBRARY_PATH This generated an ugly error with fakeroot before.
2017-02-25Rollup merge of #39903 - binarycrusader:issue-39901, r=alexcrichtonEduard-Mihai Burtescu-0/+2
add solaris sparcv9 support Fixes #39901
2017-02-25Rollup merge of #39888 - nagisa:on-fail-bootstrap, r=alexcrichtonEduard-Mihai Burtescu-3/+22
[rustbuild] add a way to run command after failure This is a simple way to workaround the debugging issues caused by the rustc wrapper used in the bootstrap process. Namely, it uses some obscure environment variables and you can't just copy the failed command and run it in the shell or debugger to examine the failure more closely. With `--on-fail` its possible to run an arbitrary command within exactly the same environment under which rustc failed. Theres's multiple ways to use this new flag: $ python x.py build --stage=1 --on-fail=env would print a list of environment variables and the failed command, so a few copy-pastes and you now can run the same rust in your shell outside the bootstrap system. $ python x.py build --stage=1 --on-fail=bash Is a more useful variation of the command above in that it launches a whole shell with environment already in place! All that's left to do is copy-paste the command just above the shell prompt! Fixes #38686 Fixes #38221
2017-02-25Auto merge of #40060 - alexcrichton:retry-downloads, r=aturonbors-4/+17
rustbuild: Retry downloads by default Don't rely on curl's --retry, it appears to not work for some errors like SSL errors.
2017-02-24Auto merge of #39892 - petrochenkov:rt, r=alexcrichtonbors-13/+21
Fix test caching on Windows/GNU Addresses https://github.com/rust-lang/rust/issues/36385#issuecomment-277131231 Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns. Now mingw startup objects are built in the native directory and then copied into the sysroot directory. They are also rebuilt only when necessary, so test caching works.
2017-02-24Auto merge of #39851 - alexcrichton:verify-unstable, r=brsonbors-35/+35
test: Verify all sysroot crates are unstable As we continue to add more crates to the compiler and use them to implement various features we want to be sure we're not accidentally expanding the API surface area of the compiler! To that end this commit adds a new `run-make` test which will attempt to `extern crate foo` all crates in the sysroot, verifying that they're all unstable. This commit discovered that the `std_shim` and `test_shim` crates were accidentally stable and fixes the situation by deleting those shims. The shims are no longer necessary due to changes in Cargo that have happened since they were originally incepted.
2017-02-23rustbuild: Retry downloads by defaultAlex Crichton-4/+17
Don't rely on curl's --retry, it appears to not work for some errors like SSL errors.
2017-02-21Create "The Unstable Book"Steve Klabnik-0/+9
part of #39588
2017-02-21travis: Move -mrelax-relocations to Docker configAlex Crichton-11/+0
This doesn't belong in rustbuild itself, and now that we have only rustbuild we can move this out of the build system.
2017-02-21test: Verify all sysroot crates are unstableAlex Crichton-35/+35
As we continue to add more crates to the compiler and use them to implement various features we want to be sure we're not accidentally expanding the API surface area of the compiler! To that end this commit adds a new `run-make` test which will attempt to `extern crate foo` all crates in the sysroot, verifying that they're all unstable. This commit discovered that the `std_shim` and `test_shim` crates were accidentally stable and fixes the situation by deleting those shims. The shims are no longer necessary due to changes in Cargo that have happened since they were originally incepted.
2017-02-21Start the port of the reference to mdBookSteve Klabnik-4/+9
This only really moves the files, there's a lot more work coming in the next commits. Part of #39588.
2017-02-20bootstrap: stop trashing (DY)LD_LIBRARY_PATHTatsuyuki Ishi-2/+6
This generated an ugly error with fakeroot before.
2017-02-18Rebuild mingw startup objects only when necessaryVadim Petrochenkov-13/+21
2017-02-17Auto merge of #39837 - alexcrichton:llvm-crt-static, r=brsonbors-0/+11
rustc: Link statically to the MSVCRT This commit changes all MSVC rustc binaries to be compiled with `-C target-feature=+crt-static` to link statically against the MSVCRT instead of dynamically (as it does today). This also necessitates compiling LLVM in a different fashion, ensuring it's compiled with `/MT` instead of `/MD`. cc #37406
2017-02-17Auto merge of #39578 - canndrew:nixos-bootstrap-fix, r=alexcrichtonbors-0/+56
Fix for bootstrapping on NixOS NixOS puts Linux's dynamic loader in wierd place. Detect when we're on NixOS and patch the downloaded bootstrap executables appropriately.
2017-02-17Style fixupsAndrew Cann-5/+6
2017-02-16add solaris sparcv9 supportShawn Walker-Salas-0/+2
* Update bootstrap to recognize the cputype 'sparcv9' (used on Solaris) * Change to never use -fomit-frame-pointer on Solaris or for sparc * Adds rust target sparcv9-sun-solaris Fixes #39901
2017-02-16[rustbuild] add a way to run command after failureSimonas Kazlauskas-3/+22
This is a simple way to workaround the debugging issues caused by the rustc wrapper used in the bootstrap process. Namely, it uses some obscure environment variables and you can’t just copy the failed command and run it in the shell or debugger to examine the failure more closely. With `--on-fail` its possible to run an arbitrary command within exactly the same environment under which rustc failed. Theres’s multiple ways to use this new flag: $ python x.py build --stage=1 --on-fail=env would print a list of environment variables and the failed command, so a few copy-pastes and you now can run the same rust in your shell outside the bootstrap system. $ python x.py build --stage=1 --on-fail=bash Is a more useful variation of the command above in that it launches a whole shell with environment already in place! All that’s left to do is copy-paste the command just above the shell prompt! Fixes #38686 Fixes #38221
2017-02-16Auto merge of #39824 - alexcrichton:disable-dist-src, r=brsonbors-0/+9
travis: Disable source tarballs on most builders Currently we create a source tarball on almost all of the `DEPLOY=1` builders but this has the adverse side effect of all source tarballs overriding themselves in the S3 bucket. Normally this is ok but unfortunately a source tarball created on Windows is not buildable on Unix. On Windows the vendored sources contain paths with `\` characters in them which when interpreted on Unix end up in "file not found" errors. Instead of this overwriting behavior, whitelist just one linux builder for producing tarballs and avoid producing tarballs on all other hosts.
2017-02-15rustc: Link statically to the MSVCRTAlex Crichton-0/+11
This commit changes all MSVC rustc binaries to be compiled with `-C target-feature=+crt-static` to link statically against the MSVCRT instead of dynamically (as it does today). This also necessitates compiling LLVM in a different fashion, ensuring it's compiled with `/MT` instead of `/MD`. cc #37406
2017-02-15travis: Disable source tarballs on most buildersAlex Crichton-0/+9
Currently we create a source tarball on almost all of the `DEPLOY=1` builders but this has the adverse side effect of all source tarballs overriding themselves in the S3 bucket. Normally this is ok but unfortunately a source tarball created on Windows is not buildable on Unix. On Windows the vendored sources contain paths with `\` characters in them which when interpreted on Unix end up in "file not found" errors. Instead of this overwriting behavior, whitelist just one linux builder for producing tarballs and avoid producing tarballs on all other hosts.
2017-02-15use bash when invoking dist shell scripts on solarisShawn Walker-Salas-7/+14
Partially fixes #25845
2017-02-15Auto merge of #39633 - steveklabnik:vendor-mdbook, r=alexcrichtonbors-0/+1
Port books to mdbook Part of https://github.com/rust-lang/rust/issues/39588 blocked on https://github.com/rust-lang/rust/pull/39431 As a first step towards the bookshelf, we ~vendor mdbook in-tree and~ port our books to it. Eventually, both of these books will be moved out-of-tree, but the nightly book will rely on doing the same thing. As such, this intermediate step is useful. r? @alexcrichton @brson /cc @azerupi
2017-02-14Auto merge of #39728 - eddyb:vendeur-tres-bien, r=alexcrichtonbors-9/+48
Automate vendoring by invoking cargo-vendor when building src dist tarballs. This avoids #39633 bringing the `src/vendor` checked into git by #37524, past 200,000 lines of code. I believe the strategy of having rustbuild run `cargo vendor` during the `dist src` step is sound. However, the only way to be sure `cargo-vendor` exists is to run `cargo install --force cargo-vendor`, which will recompile it every time (not passing `--force` means you can't tell between "already exists" and "build error"). ~~This is quite suboptimal and I'd like to somehow do it in each `Dockerfile` that would need it.~~ * [ ] Cache `CARGO_HOME` (i.e. `~/.cargo`) between CI runs * `bin/cargo-vendor` and the actual caches are the relevant bits * [x] Do not build `cargo-vendor` all the time * ~~Maybe detect `~/.cargo/bin/cargo-vendor` already exists?~~ * ~~Could also try to build it in a `Dockerfile` but do we have `cargo`/`rustc` there?~~ * Final solution: check `cargo install --list` for a line starting with `cargo-vendor ` cc @rust-lang/tools
2017-02-14Automatically vendor Cargo deps when building the source tarballs.Eduard-Mihai Burtescu-9/+48
2017-02-13Re-implement rustbook in terms of mdbookSteve Klabnik-0/+1
mdbook has a lot of optional dependencies that we don't want, so instead of using it directly, we re-build rustbook to use mdbook as a library. For convenience' sake, we keep the same CLI interface as mdbook; the only difference is that it only accepts build and test subcommands, rather than the full range.