about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2018-03-07Fix an error in the appveyor configAlex Crichton-2/+6
2018-03-07appveyor: Shard more slow MSVC buildersAlex Crichton-0/+1
Take two more slow builders and split them in two to get them under 2 hrs
2018-03-05Get the path to cargo from rustbuildMark Mansi-0/+1
2018-03-04Include stdsimd in rust-src componentAlex Crichton-0/+1
Closes #48734
2018-03-04Auto merge of #48630 - alexcrichton:more-sccache, r=kennytmbors-5/+22
rustbuild: Pass `ccache` to build scripts This is a re-attempt at #48192 hopefully this time with 100% less randomly [blocking builds for 20 minutes][block]. To work around #48192 the sccache server is started in the `run.sh` script very early on in the compilation process. [block]: https://github.com/rust-lang/rust/issues/48192
2018-03-03rustc: Tweak default linker selectionAlex Crichton-7/+12
This commit refactors how the path to the linker that we're going to invoke is selected. Previously all targets listed *both* a `LinkerFlavor` and a `linker` (path) option, but this meant that whenever you changed one you had to change the other. The purpose of this commit is to avoid coupling these where possible. Target specifications now only unconditionally define the *flavor* of the linker that they're using by default. If not otherwise specified each flavor now implies a particular default linker to run. As a result, this means that if you'd like to test out `ld` for example you should be able to do: rustc -Z linker-flavor=ld foo.rs whereas previously you had to do rustc -Z linker-flavor=ld -C linker=ld foo.rs This will hopefully make it a bit easier to tinker around with variants that should otherwise be well known to work, for example with LLD, `ld` on OSX, etc.
2018-03-03rust: Import LLD for linking wasm objectsAlex Crichton-74/+198
This commit imports the LLD project from LLVM to serve as the default linker for the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently removed along with "binaryen linker" support in rustc. Moving to LLD brings with it a number of benefits for wasm code: * LLD is itself an actual linker, so there's no need to compile all wasm code with LTO any more. As a result builds should be *much* speedier as LTO is no longer forcibly enabled for all builds of the wasm target. * LLD is quickly becoming an "official solution" for linking wasm code together. This, I believe at least, is intended to be the main supported linker for native code and wasm moving forward. Picking up support early on should help ensure that we can help LLD identify bugs and otherwise prove that it works great for all our use cases! * Improvements to the wasm toolchain are currently primarily focused around LLVM and LLD (from what I can tell at least), so it's in general much better to be on this bandwagon for bugfixes and new features. * Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which means a postprocessor is no longer needed to show off Rust's "small wasm binary size". LLD is added in a pretty standard way to rustc right now. A new rustbuild target was defined for building LLD, and this is executed when a compiler's sysroot is being assembled. LLD is compiled against the LLVM that we've got in tree, which means we're currently on the `release_60` branch, but this may get upgraded in the near future! LLD is placed into rustc's sysroot in a `bin` directory. This is similar to where `gcc.exe` can be found on Windows. This directory is automatically added to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd` linker which implements the interface that `wasm-ld`, LLD's frontend, expects. Like Emscripten the LLD target is currently only enabled for Tier 1 platforms, notably OSX/Windows/Linux, and will need to be installed manually for compiling to wasm on other platforms. LLD is by default turned off in rustbuild, and requires a `config.toml` option to be enabled to turn it on. Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD has a native option for controlling this. [gc]: https://reviews.llvm.org/D42511
2018-03-04Rollup merge of #48664 - Keruspe:codegen, r=alexcrichtonkennytm-3/+10
make codegen-backends directory name configurable This allows to parallel-install several versions of rust system-wide Fixes #48263
2018-03-04Rollup merge of #48680 - steveklabnik:no-toc, r=nikomatsakiskennytm-0/+1
Don't produce TOCs for doc markdown files Currently, we are producing headers for markdown files, which is generally not what we want. As such, passing this flag causes them to render normally. https://doc.rust-lang.org/nightly/book/ is an example page currently where this is done incorrectly.
2018-03-03Rollup merge of #48637 - segevfiner:restore-rust-mingw-download, r=alexcrichtonkennytm-0/+8
Restore the download of rust-mingw The build might otherwise break due to mixing MinGW object files from rust-std and the local MinGW which might be newer/older than the version used to build rust-std. Fixes #48272 r? @alexcrichton
2018-03-03Rollup merge of #48569 - Phlosioneer:x-py-help-optimization, r=petrochenkovkennytm-25/+15
Improve --help performance for x.py Since compiling the bootstrap command doesn't require any submodules, we can skip updating submodules when a --help command is passed in. On my machine, this saves 1 minute if the submodules are already downloaded, and 10 minutes if run on a clean repo. This commit also adds a message before compiling/downloading anything when a --help command is passed in, to tell the user WHY --help takes so long to complete. It also points the user to the bootstrap README.md for faster help. Finally, this fixes one warning message that still referenced using make instead of x.py, even though x.py is now the standard way of building rust. Closes #37305
2018-03-02Don't produce TOCs for doc markdown filessteveklabnik-0/+1
Currently, we are producing headers for markdown files, which is generally not what we want. As such, passing this flag causes them to render normally.
2018-03-02make codegen-backends directory name configurableMarc-Antoine Perennou-3/+10
This allows to parallel-install several versions of rust system-wide Fixes #48263 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-03-02Remove print_what_bootstrap_meansPhlosioneer-27/+8
It was an existing solution to tell the user why a --help command takes a long time to process. However, it would only print if the stage0 rust compiler needed to be downloaded, it came after update_submodules (which took a long time), and it was immediately followed by download messages and loading bars, meaning users could easily gloss over the message. This commit also moves the help message out of main(), and instead puts it at the top of bootstrap(). main() is intended to be minimal, only handling error messages.
2018-03-01rustbuild: Pass `ccache` to build scriptsAlex Crichton-5/+22
This is a re-attempt at #48192 hopefully this time with 100% less randomly [blocking builds for 20 minutes][block]. To work around #48192 the sccache server is started in the `run.sh` script very early on in the compilation process. [block]: https://github.com/rust-lang/rust/issues/48192
2018-03-01Rollup merge of #48405 - kennytm:autotoolstate-follow-up, r=Mark-SimulacrumManish Goregaokar-21/+75
Auto-toolstate management follow-up. Tracking comment: https://github.com/rust-lang/rust/issues/45861#issuecomment-367302777 * Fixed rust-lang-nursery/rust-toolstate#1, a proper link to the PR will be included. * Fixed rust-lang-nursery/rust-toolstate#2, a comment will be posted to the PR if the toolstate changed * Toolstate regression will be rejected at the last week of the 6-week cycle (currently entirely date-based). * Implemented https://internals.rust-lang.org/t/the-current-submodule-setup-is-not-tenable/6593, moved doc tests of Nomicon, Reference, Rust-by-Example and The Book to the "tools" job and thus allowed to fail like other external tools.
2018-03-01Document why we download rust-mingwSegev Finer-0/+3
2018-03-01Restore the download of rust-mingwSegev Finer-0/+5
The build might otherwise break due to mixing MinGW object files from rust-std and the local MinGW which might be newer/older than the version used to build rust-std. Fixes #48272
2018-02-28Rollup merge of #48558 - Mark-Simulacrum:error-format, r=Manishearthkennytm-1/+5
Fix error-format to properly send JSON to stdout Since we take Cargo's JSON messages as well we need to specifically send rustc's messages out so we don't hide them. r? @Manishearth
2018-02-26Improve --help performance for x.pyPhlosioneer-4/+13
Since compiling the bootstrap command doesn't require any submodules, we can skip updating submodules when a --help command is passed in. On my machine, this saves 1 minute if the submodules are already downloaded, and 10 minutes if run on a clean repo. This commit also adds a message before compiling/downloading anything when a --help command is passed in, to tell the user WHY --help takes so long to complete. It also points the user to the bootstrap README.md for faster help. Finally, this fixes one warning message that still referenced using make instead of x.py, even though x.py is now the standard way of building rust.
2018-02-26Fix error-format argument to x.pyMark Simulacrum-1/+5
2018-02-26bootstrap: Add openssl configuration for powerpc-unknown-linux-gnuspeJohn Paul Adrian Glaubitz-0/+1
2018-02-25Rollup merge of #48517 - penpalperson:master, r=Mark-Simulacrumkennytm-0/+13
Added error-format flag to x.py. Fixes #48475 r? @Mark-Simulacrum
2018-02-25Rollup merge of #48489 - glaubitz:x32-linux, r=alexcrichtonkennytm-0/+1
bootstrap: Add openssl configuration for x86_64-unknown-linux-gnux32 OpenSSL provides a native configuration for x86_64-unknown-linux-gnux32: > https://github.com/openssl/openssl/blob/master/Configurations/10-main.conf#L810 Let's use it.
2018-02-25Rollup merge of #48362 - cuviper:libdir_relative, r=Mark-Simulacrumkennytm-6/+17
rustbuild: Restore Config.libdir_relative This re-introduces a `Config.libdir_relative` field, now derived from `libdir` and made relative to `prefix` if necessary. This fixes a regression from #46592 when `--libdir` is given an absolute path. `Builder::sysroot_libdir` should always use a relative path so its callers don't clobber system locations, and `librustc` also asserts that `CFG_LIBDIR_RELATIVE` is really relative.
2018-02-25Rollup merge of #48297 - glaubitz:sparc-linux, r=estebankkennytm-1/+2
Add missing pieces for sparc-linux-gnu support I noticed that while Rust has CABI support for 32-bit SPARC, there are still some pieces missing to be able to use Rust on a 32-Bit SPARC system like Gentoo which still defaults to a 32-bit port unlike Debian's sparc64 port. This PR is an attempt to add the missing pieces. I will send the necessary changes for libc in a separate PR. CC @jrtc27
2018-02-25Rollup merge of #48281 - jakllsch:netbsd-powerpc, r=alexcrichtonkennytm-0/+1
Add powerpc-unknown-netbsd target
2018-02-24Added error-format flag to x.py.penpalperson-0/+13
2018-02-24Remove directory `src/rt`Vadim Petrochenkov-3/+3
2018-02-24bootstrap: Add openssl configuration for x86_64-unknown-linux-gnux32John Paul Adrian Glaubitz-0/+1
2018-02-24Run the external doc tests in tools job.kennytm-6/+16
2018-02-23bootstrap: Add openssl configuration for sparc-unknown-linux-gnuJohn Paul Adrian Glaubitz-0/+1
2018-02-23bootstrap: Add missing cputype matching for sparcJohn Paul Adrian Glaubitz-1/+1
2018-02-23Split test::Docs into one Step for each book.kennytm-14/+57
The *.md at the root directory in src/doc are no longer tested, but this should be fine since all files there are deprecated.
2018-02-23CI: Fixed the incorrect folder region when building codegen dylib.kennytm-1/+2
2018-02-20Bootstrap from the 1.25 betaMark Simulacrum-1/+1
2018-02-19rustbuild: make libdir_relative a methodJosh Stone-23/+17
2018-02-19rustbuild: Restore Config.libdir_relativeJosh Stone-3/+20
This re-introduces a `Config.libdir_relative` field, now derived from `libdir` and made relative to `prefix` if necessary. This fixes a regression from #46592 when `--libdir` is given an absolute path. `Builder::sysroot_libdir` should always use a relative path so its callers don't clobber system locations, and `librustc` also asserts that `CFG_LIBDIR_RELATIVE` is really relative.
2018-02-18Rollup merge of #48275 - matthiaskrgr:codespell, r=kennytm,varkorGuillaume Gomez-1/+1
fix more typos found by codespell.
2018-02-18Rollup merge of #48274 - GuillaumeGomez:remove-hoedown, r=QuietMisdreavusGuillaume Gomez-5/+2
Remove hoedown from rustdoc Finally the time has come! r? @QuietMisdreavus
2018-02-17fix more typos found by codespell.Matthias Krüger-1/+1
2018-02-17Add command to launch only doc testsGuillaume Gomez-0/+15
2018-02-16Remove hoedown from rustdocGuillaume Gomez-5/+2
Is it really time? Have our months, no, *years* of suffering come to an end? Are we finally able to cast off the pall of Hoedown? The weight which has dragged us down for so long? ----- So, timeline for those who need to catch up: * Way back in December 2016, [we decided we wanted to switch out the markdown renderer](https://github.com/rust-lang/rust/issues/38400). However, this was put on hold because the build system at the time made it difficult to pull in dependencies from crates.io. * A few months later, in March 2017, [the first PR was done, to switch out the renderers entirely](https://github.com/rust-lang/rust/pull/40338). The PR itself was fraught with CI and build system issues, but eventually landed. * However, not all was well in the Rustdoc world. During the PR and shortly after, we noticed [some differences in the way the two parsers handled some things](https://github.com/rust-lang/rust/issues/40912), and some of these differences were major enough to break the docs for some crates. * A couple weeks afterward, [Hoedown was put back in](https://github.com/rust-lang/rust/pull/41290), at this point just to catch tests that Pulldown was "spuriously" running. This would at least provide some warning about spurious tests, rather than just breaking spontaneously. * However, the problems had created enough noise by this point that just a few days after that, [Hoedown was switched back to the default](https://github.com/rust-lang/rust/pull/41431) while we came up with a solution for properly warning about the differences. * That solution came a few weeks later, [as a series of warnings when the HTML emitted by the two parsers was semantically different](https://github.com/rust-lang/rust/pull/41991). But that came at a cost, as now rustdoc needed proc-macro support (the new crate needed some custom derives farther down its dependency tree), and the build system was not equipped to handle it at the time. It was worked on for three months as the issue stumped more and more people. * In that time, [bootstrap was completely reworked](https://github.com/rust-lang/rust/pull/43059) to change how it ordered compilation, and [the method by which it built rustdoc would change](https://github.com/rust-lang/rust/pull/43482), as well. This allowed it to only be built after stage1, when proc-macros would be available, allowing the "rendering differences" PR to finally land. * The warnings were not perfect, and revealed a few [spurious](https://github.com/rust-lang/rust/pull/44368) [differences](https://github.com/rust-lang/rust/pull/45421) between how we handled the renderers. * Once these were handled, [we flipped the switch to turn on the "rendering difference" warnings all the time](https://github.com/rust-lang/rust/pull/45324), in October 2017. This began the "warning cycle" for this change, and landed in stable in 1.23, on 2018-01-04. * Once those warnings hit stable, and after a couple weeks of seeing whether we would get any more reports than what we got from sitting on nightly/beta, [we switched the renderers](https://github.com/rust-lang/rust/pull/47398), making Pulldown the default but still offering the option to use Hoedown. And that brings us to the present. We haven't received more new issues from this in the meantime, and the "switch by default" is now on beta. Our reasoning is that, at this point, anyone who would have been affected by this has run into it already.
2018-02-16Add powerpc-unknown-netbsd targetJonathan A. Kollasch-0/+1
2018-02-16Fix panic when `x.py` is called without any arguments.kennytm-2/+4
2018-02-15Consider paths passed to x.py to be root-relative.Mark Simulacrum-6/+6
We'd previously assumed that these paths would be relative to the src dir, and that for example our various CI scripts would, when calling x.py, use `../x.py build ../src/tools/...` but this isn't the case -- they use `../x.py` without using the relevant source-relative path. We eventually may want to make this (actually somewhat logical) change, but this is not that time.
2018-02-15Prevent silently ignoring unmatched pathsMark Simulacrum-1/+1
Primarily for CI purposes; this is intended to avoid cases where we update rustbuild and unintentionally make CI stop running some builds to the arguments being passed no longer applying for some reason.
2018-02-15Auto merge of #48203 - kennytm:rollup, r=kennytmbors-0/+8
Rollup of 23 pull requests - Successful merges: #47784, #47806, #47846, #48005, #48033, #48065, #48087, #48114, #48126, #48130, #48133, #48151, #48154, #48156, #48162, #48163, #48165, #48167, #48181, #48186, #48195, #48035, #48210 - Failed merges:
2018-02-15Auto merge of #48105 - Mark-Simulacrum:exclude-paths, r=alexcrichtonbors-327/+444
Implement excluding a build-step via --exclude First step to fixing https://github.com/rust-lang/rust/issues/47911. This doesn't change any CI configuration, but implements what I believe necessary to make that feasible in rustbuild. In theory this should be sufficient to allow someone to open a PR against .travis.yml and appveyor.yml which splits the Windows 32-bit tests and maybe the OS X tests into multiple builders (depending on what our cost-concerns are) to reduce runtimes. r? @alexcrichton cc @kennytm
2018-02-15Revert "rustbuild: Pass `ccache` to build scripts"Alex Crichton-22/+5
This reverts commit 64a8730e171367e4979cd9c25f0e0fdc2c157446.