about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2020-05-29Fix lld detection if stage0 rustc built with custom libdirO01eg-7/+13
2020-05-24bootstrap: propagate test-args to miri and clippy test suitesRalf Jung-0/+4
2020-05-22Rollup merge of #72453 - dtolnay:open, r=Mark-SimulacrumDylan DPC-3/+73
Add flag to open docs: x.py doc --open This aligns with Cargo's flag `cargo doc --open`. Tested with: ```bash # opens doc/index.html x.py doc --stage 0 --open x.py doc --stage 0 --open src/doc # opens doc/book/index.html x.py doc --stage 0 --open src/doc/book # opens doc/std/index.html x.py doc --stage 0 --open src/libstd # opens doc/proc_macro/index.html x.py doc --stage 0 --open src/libproc_macro # opens both x.py doc --stage 0 --open src/libstd src/libproc_macro ```
2020-05-22Report error from opener in bootstrapDavid Tolnay-4/+4
On my machine, an error looks like: Finished release [optimized] target(s) in 0.29s Opening doc /git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html command 'xdg-open (internal)' did not execute successfully; exit code: 4 command stderr: gio: file:///git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html: Error when getting information for file “/git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html”: No such file or directory Build completed successfully in 0:00:08
2020-05-22Auto merge of #72000 - cuviper:dist-llvm, r=Mark-Simulacrumbors-20/+30
Move the target libLLVM to llvm-tools-preview For running the compiler, we usually only need LLVM from `$sysroot/lib`, which rustup will make available with `LD_LIBRARY_PATH`. We've also been shipping LLVM in the `$target/lib` directory, which bloats the download and installed size. The only times we do need the latter are for the RPATH of `llvm-tools-preview` binaries, and for linking `rustc-dev` libraries. We'll move it to the `llvm-tools-preview` component directly, and `rustc-dev` will have an implicit dependency on it. Here are the dist sizes that I got before and after this change: llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz 1.3M 24M llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz 748K 17M rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz 83M 61M rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz 56M 41M The installed size should reduce by exactly one `libLLVM.so` (~70-80M), unless you also install `llvm-tools`, and then it should be identical. Resolves #70838.
2020-05-21Add flag to open docs: x.py doc --openDavid Tolnay-3/+73
Tested with: # opens doc/index.html x.py doc --stage 0 --open x.py doc --stage 0 --open src/doc # opens doc/book/index.html x.py doc --stage 0 --open src/doc/book # opens doc/std/index.html x.py doc --stage 0 --open src/libstd # opens doc/proc_macro/index.html x.py doc --stage 0 --open src/libproc_macro # opens both x.py doc --stage 0 --open src/libstd src/libproc_macro
2020-05-20Move the target libLLVM to llvm-tools-previewJosh Stone-20/+30
For running the compiler, we usually only need LLVM from `$sysroot/lib`, which rustup will make available with `LD_LIBRARY_PATH`. We've also been shipping LLVM in the `$target/lib` directory, which bloats the download and installed size. The only times we do need the latter are for the RPATH of `llvm-tools-preview` binaries, and for linking `rustc-dev` libraries. We'll move it to the `llvm-tools-preview` component directly, and `rustc-dev` will have an implicit dependency on it. Here are the dist sizes that I got before and after this change: llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz 1.3M 24M llvm-tools-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz 748K 17M rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.gz 83M 61M rustc-1.45.0-dev-x86_64-unknown-linux-gnu.tar.xz 56M 41M The installed size should reduce by exactly one `libLLVM.so` (~70-80M), unless you also install `llvm-tools`, and then it should be identical.
2020-05-20Auto merge of #67759 - nikic:llvm-10, r=Mark-Simulacrumbors-0/+4
Update to LLVM 10 LLVM 10 is going to be branched soon, so it's a good time to start finding all those tasty new miscompiles and performance regressions ;) Status: * Preparation split off into #67900. * Optimization regressions: * [x] https://bugs.llvm.org/show_bug.cgi?id=44419 => https://reviews.llvm.org/D72048 has landed. * [x] https://bugs.llvm.org/show_bug.cgi?id=44423 => https://reviews.llvm.org/D72060 has landed. * [x] https://reviews.llvm.org/D72169 submitted. * [ ] https://bugs.llvm.org/show_bug.cgi?id=44461 reported. https://reviews.llvm.org/D72420 submitted, but unlikely eligible for LLVM 10. * Compile-time regressions: * [x] GlobalOpt regression identified. ~~fhahn proposed https://reviews.llvm.org/D72214.~~ fhahn has [reverted](https://github.com/llvm/llvm-project/commit/192cce10f67e4f22be6d9b8c0975f78ad246d1bd) the patch. * [ ] Even with the revert, there are [large regressions](https://perf.rust-lang.org/compare.html?start=760ce94c69ca510d44087291c311296f6d9ccdf5&end=4e84f97d76e694bb9f59039f5bdeb6d8bca46d14). * Assertion failures / infinite loops: * [x] https://bugs.llvm.org/show_bug.cgi?id=44600 => https://reviews.llvm.org/D73135, https://reviews.llvm.org/D73854 and https://reviews.llvm.org/D73908 have landed and been cherry-picked to the 10.x branch. * [x] https://bugs.llvm.org/show_bug.cgi?id=44835 => https://reviews.llvm.org/D74278 has landed and been cherry-picked.
2020-05-20Set CMAKE_CXX_STANDARD when compiling LLDNikita Popov-0/+4
2020-05-20Auto merge of #71769 - petrochenkov:crto, r=cuviperbors-6/+7
linker: More systematic handling of CRT objects Document which kinds of `crt0.o`-like objects we link and in which cases, discovering bugs in process. `src/librustc_target/spec/crt_objects.rs` is the place to start reading from. This PR also automatically contains half of the `-static-pie` support (https://github.com/rust-lang/rust/pull/70740), because that's one of the six cases that we need to consider when linking CRT objects. This is a breaking change for custom target specifications that specify CRT objects. Closes https://github.com/rust-lang/rust/issues/30868
2020-05-17bootstrap: fix typoRalf Jung-1/+1
2020-05-15Rollup merge of #72172 - Mark-Simulacrum:check-no-stage, r=alexcrichtonDylan DPC-0/+14
Forbid stage arguments to check Users generally expect that check builds are fast, and that's only true in stage 0 (stages beyond that need us to build a compiler, which is slow). Closes #69337 r? @alexcrichton
2020-05-15Rollup merge of #72146 - Mark-Simulacrum:separate-std-asserts, r=alexcrichtonDylan DPC-1/+14
Provide separate option for std debug asserts On local one-off benchmarking of libcore metadata-only, debug asserts in std are a significant hit (15s to 20s). Provide an option for compiler developers to disable them. A build with a nightly compiler is around 10s, for reference.
2020-05-14Rollup merge of #71964 - jcotton42:bootstrap_decode_none_windows, ↵Ralf Jung-3/+6
r=Mark-Simulacrum Fix bootstrap failing on win32 ```powershell python x.py -h # or really any x.py command ``` would fail with ``` info: Downloading and building bootstrap before processing --help command. See src/bootstrap/README.md for help with common commands. Updating only changed submodules Submodules updated in 0.15 seconds Traceback (most recent call last): File "x.py", line 11, in <module> bootstrap.main() File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 960, in main bootstrap(help_triggered) File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 925, in bootstrap build.build = args.build or build.build_triple() File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 731, in build_triple return default_build_triple() File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 184, in default_build_triple ostype = require(["uname", "-s"], exit=required).decode(default_encoding) AttributeError: 'NoneType' object has no attribute 'decode' ``` This PR defers the `decode` call until after we're sure `ostype` and `cputype` are not `None`, as they would be on Windows since `uname` doesn't exist
2020-05-14linker: More systematic handling of CRT objectsVadim Petrochenkov-6/+7
2020-05-14Auto merge of #72058 - RalfJung:no-dist-lldb, r=Mark-Simulacrumbors-162/+7
bootstrap: remove lldb dist packaging The lldb-preview rustup package is missing on every single target, and has never been shipped beyond x86_64-apple-darwin. It was removed in #62592 which landed around a year ago, and there's not been demand that we re-enable it since, so we're now removing support entirely to cleanup the code a bit. The hope is that this will also kill the useless "lldb-preview" row on https://rust-lang.github.io/rustup-components-history/.
2020-05-13Forbid stage arguments to checkMark Rousskov-0/+14
Users generally expect that check builds are fast, and that's only true in stage 0 (stages beyond that need us to build a compiler, which is slow).
2020-05-12Provide separate option for std debug assertsMark Rousskov-1/+14
2020-05-12Fix bootstrap failing on win32Joshua Cotton-3/+6
2020-05-11update miri some moreRalf Jung-1/+0
2020-05-10remove lldb package from bootstrap, config and build-manifestRalf Jung-162/+7
it's not been built since a long time ago
2020-05-09Rollup merge of #71185 - JohnTitor:run-fail, r=petrochenkovRalf Jung-12/+0
Move tests from `test/run-fail` to UI Fixes #65440 cc #65865 #65506 r? @nikomatsakis
2020-05-08x.py: allow configuring the build directoryJoshua Nelson-2/+11
This allows configuring the directory for build artifacts, instead of having it always be ./build. This means you can set it to a constant location, letting you reuse the same cache while working in several different directories. The configuration lives in config.toml under build.build-dir. By default, it keeps the existing default of ./build, but it can be configured to any relative or absolute path. Additionally, it allows making outputs relative to the root of the git repository using $ROOT.
2020-05-06Rollup merge of #71731 - mark-i-m:guide-toolstate-off-for-now, r=kennytmDylan DPC-1/+1
Turn off rustc-dev-guide toolstate for now cc @rust-lang/wg-rustc-dev-guide @rust-lang/infra @ehuss When we first added toolstate, the intent was to use toolstate to linkcheck PRs so that we would know which PRs break links in the guide (e.g. by moving some definition). However, these days, we are mostly getting 429 errors (too many requests) from github (not sure when this changed), and every day, there seems to be a spurious failure of some other sort. This is all despite efforts to filter out spurious failures. Getting spurious gh pings is annoying, and we're not actually getting a lot out of this linkcheck beyond what we are getting with our CI on the guide's repo, so I'm proposing to disable this until we can figure out what might be a better path forward.
2020-05-06Rollup merge of #71819 - jyn514:check-for-tools, r=Mark-SimulacrumDylan DPC-23/+25
x.py: Give a more helpful error message if curl isn't installed Before: ``` Updating only changed submodules Submodules updated in 0.01 seconds Traceback (most recent call last): File "./x.py", line 11, in <module> bootstrap.main() ... File "/home/joshua/src/rust/src/bootstrap/bootstrap.py", line 137, in run ret = subprocess.Popen(args, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory ``` After: ``` Updating only changed submodules Submodules updated in 0.01 seconds spurious failure, trying again spurious failure, trying again spurious failure, trying again spurious failure, trying again failed to run: curl -s -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmpSWF21P.sha256 https://static.rust-lang.org/dist/2020-04-22/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz.sha256: [Errno 2] No such file or directory Build completed unsuccessfully in 0:00:00 ```
2020-05-06Rollup merge of #71905 - mibac138:x-cmd-alias, r=Mark-SimulacrumDylan DPC-13/+17
Add command aliases from Cargo to x.py commands Fixes #71357
2020-05-06Remove code related to `test/run-fail`Yuki Okushi-12/+0
2020-05-05comment out rustc-dev-guide in NIGHTLY_TOOLSmark-1/+1
2020-05-05Add command aliases from Cargo to x.py commandsmibac138-13/+17
2020-05-03x.py: Give a more helpful error message if curl isn't installedJoshua Nelson-23/+25
This also abstracts checking for a command into `require`. Before: ``` Updating only changed submodules Submodules updated in 0.01 seconds Traceback (most recent call last): File "./x.py", line 11, in <module> bootstrap.main() ... File "/home/joshua/src/rust/src/bootstrap/bootstrap.py", line 137, in run ret = subprocess.Popen(args, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory ``` After: ``` error: unable to run `curl --version`: [Errno 2] No such file or directory Please make sure it's installed and in the path. ```
2020-05-03Remove clippy from some leftover lists of "possibly failing" toolsOliver Scherer-2/+1
2020-05-03Auto merge of #71815 - Mark-Simulacrum:no-llvm-rebuild, r=jonas-schievinkbors-50/+88
Don't bust caches on x.py check/build switches Fixes #71152
2020-05-02Don't skip building LLVM if already builtMark Rousskov-5/+17
2020-05-02Extract stamp testing for LLVMMark Rousskov-45/+71
The extracted function can be used by the rest of bootstrap to detect if we've already built an up-to-date LLVM (and so it's safe for us to either request it or pretend it exists).
2020-05-02Auto merge of #70655 - oli-obk:subrepo_funness, r=Mark-Simulacrumbors-129/+108
Make clippy a git subtree instead of a git submodule r? @eddyb cc #70651 documentation at https://github.com/rust-lang/rust/pull/70654
2020-05-02Rollup merge of #71736 - RalfJung:silence-spurious-unused, r=Mark-SimulacrumRalf Jung-6/+6
bootstrap: also apply unused-attributes hack without deny_warnings This is a follow-up to https://github.com/rust-lang/rust/pull/70881 that also silences these warnings when deny_warnings is off. They otherwise spam my screen during development and make it hard to see actual warnings. Cc @eddyb r? @Mark-Simulacrum
2020-05-02Also build clippy with `./x.py check`Oliver Scherer-69/+75
2020-05-02Gate on clippy on CIOliver Scherer-60/+33
2020-05-02Auto merge of #71716 - alexcrichton:bitcode-follow-up, r=nnethercotebors-3/+3
Rename `bitcode-in-rlib` option to `embed-bitcode` This commit finishes work first pioneered in #70458 and started in #71528. The `-C bitcode-in-rlib` option, which has not yet reached stable, is renamed to `-C embed-bitcode` since that more accurately reflects what it does now anyway. Various tests and such are updated along the way as well. This'll also need to be backported to the beta channel to ensure we don't accidentally stabilize `-Cbitcode-in-rlib` as well.
2020-05-01Rename `bitcode-in-rlib` option to `embed-bitcode`Alex Crichton-3/+3
This commit finishes work first pioneered in #70458 and started in #71528. The `-C bitcode-in-rlib` option, which has not yet reached stable, is renamed to `-C embed-bitcode` since that more accurately reflects what it does now anyway. Various tests and such are updated along the way as well. This'll also need to be backported to the beta channel to ensure we don't accidentally stabilize `-Cbitcode-in-rlib` as well.
2020-05-01bootstrap: also apply unused-attributes hack without deny_warningsRalf Jung-6/+6
2020-04-30Rollup merge of #71567 - Mark-Simulacrum:no-success, r=matthiaskrgrTyler Mandry-0/+3
Handle build completion message from Cargo This was introduced in the recent bump to 1.44 bootstrap cargo Fixes #71561.
2020-04-30Rollup merge of #71559 - dillona:detect_git_progress_version, r=Mark-SimulacrumDylan DPC-11/+15
Detect git version before attempting to use --progress Otherwise each update is run twice and errors are printed I've tested this with: git version 2.8.2.windows.1 (Windows) git version 2.26.2.266.ge870325ee8 (Linux built from source) git version 2.17.1 (Linux) git version 2.21.1 (Apple Git-122.3) (MacOS) I've tested with Python 2.7 (Windows, Linux, MacOS), 3.6 (Linux), and 3.7 (MacOS)
2020-04-29Add an index page for nightly rustc docs.Eric Huss-1/+5
2020-04-28Auto merge of #71486 - alexcrichton:arm64-lld, r=Mark-Simulacrumbors-2/+28
Enable "full tools" option on ARM dist builders This commit switches the `--enable-extended` option on the arm-related dist builders to `--enable-full-tools`. This alias in `config.py` corresponds to enabling a few more options: * `rust.lld = true` - this is the main purpose of this PR, to enable LLD on ARM-related platforms. This means it will effectively unlock compilation of wasm programs from an arm host. * `rust.llvm-tools = true` - it turns out that this option is largely ignored in rustbuild today. This is only read in one location to set some flags for the `llvm-tools` package, but the `llvm-tools` package is already produced on all of these builders. It's predicted that this will have no effect on build times. * `rust.codegen-backends = ['llvm']` - historically this also enabled the emscripten backend, but that has long since been removed. This brings the ARM dist builders in line with the x86_64 dist builders using this flag. The hope is that the extra time spent on CI building LLD will acceptable because it's cached by `sccache`, LLD is a relatively small C++ project, and the dist builders are all clocking well under 3 hours (the slowest of all builders) around 2 hours. There's likely some possible cleanup that can happen with these configure options since it doesn't look like they've aged too too well, but I'm hopeful that possible refactorings, if necessary, could be deferred to future PRs.
2020-04-25Handle build completion message from CargoMark Rousskov-0/+3
This was introduced in the recent bump to 1.43 bootstrap cargo
2020-04-25Detect git version before attempting to use --progressDillon Amburgey-11/+15
Otherwise each update is run twice and errors are printed
2020-04-25Auto merge of #71439 - Mark-Simulacrum:stage0-next, r=jonas-schievinkbors-1/+1
Bump bootstrap compiler This bumps the bootstrap compiler and the rustfmt that x.py fmt uses.
2020-04-25Bump bootstrap compilerMark Rousskov-1/+1
2020-04-25Auto merge of #71458 - ecstatic-morse:bootstrap-cfg-doc, r=Mark-Simulacrumbors-3/+18
Set `--cfg bootstrap` for stage0 rustdoc Resolves #71455. With this patch, running `./x.py doc --stage 0 src/libstd` with a clean `build` dir successfully outputs docs for `core`, `alloc` and `std` in under a minute. This kind of turnaround for viewing small changes to the standard library documentation is quite nice, and I think we should endeavour to keep it working. I'm not sure how involved that would be though. r? @Mark-Simulacrum