about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
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.
2018-02-14Rollup merge of #47846 - roblabla:bugfix-ocaml, r=kennytmkennytm-0/+8
Work around LLVM OCAML binding installation failure Hello, I have OCaml installed on my machine, and compiling rust systematically fails when LLVM attempts installing the OCaml bindings in `/usr/lib/ocaml`, which is write-protected. Here are the logs: https://gist.github.com/roblabla/3f147914c5df627c9d97ab311ba133ad Some digging around the issue reveals: - The code that finds if OCaml is installed, and sets the bindings to be compiled/installed: https://github.com/llvm-mirror/llvm/blob/b24a45d2e9f4fc10c3f9e16172104910b38637f2/cmake/config-ix.cmake#L612 - https://github.com/llvm-mirror/llvm/blob/b24a45d2e9f4fc10c3f9e16172104910b38637f2/bindings/ocaml/llvm/CMakeLists.txt Some code that does the installation. The problem seems to be that `LLVM_OCAML_INSTALL_PATH` is set to `OCAML_STDLIB_PATH` by default, which is in `/usr/lib/ocaml`, instead of the prefix. This PR "fixes" the issue by setting `LLVM_OCAML_INSTALL_PATH` to `usr/lib/ocaml`. I haven't found a way to make LLVM not build OCaml, which would probably be a superior fix.
2018-02-13Fix default Steps without paths.Mark Simulacrum-5/+10
Some Steps are by-default run but don't have any paths associated with them. We need to have at least one PathSet per each Step, though, so we add an empty one on calls to `never()`.
2018-02-11Change Step to be invoked with a path when in default mode.Mark Simulacrum-312/+415
Previously, a Step would be able to tell on its own when it was invoked "by-default" (that is, `./x.py test` was called instead of `./x.py test some/path`). This commit replaces that functionality, invoking each Step with each of the paths it has specified as "should be invoked by." For example, if a step calls `path("src/tools/cargo")` and `path("src/doc/cargo")` then it's make_run will be called twice, with "src/tools/cargo" and "src/doc/cargo." This makes it so that default handling logic is in builder, instead of spread across various Steps. However, this meant that some Step specifications needed to be updated, since for example `rustdoc` can be built by `./x.py build src/librustdoc` or `./x.py build src/tools/rustdoc`. A `PathSet` abstraction is added that handles this: now, each Step can not only list `path(...)` but also `paths(&[a, b, ...])` which will make it so that we don't invoke it with each of the individual paths, instead invoking it with the first path in the list (though this shouldn't be depended on). Future work likely consists of implementing a better/easier way for a given Step to work with "any" crate in-tree, especially those that want to run tests, build, or check crates in the std, test, or rustc crate trees. Currently this is rather painful to do as most of the logic is duplicated across should_run and make_run. It seems likely this can be abstracted away into builder somehow.
2018-02-10Remove DontDistWithMiri struct and instead just directly check it in builderMark Simulacrum-27/+7
2018-02-10Make exclude and paths relative to root of checkoutMark Simulacrum-7/+10
2018-02-10Implement excluding a build-step via --excludeMark Simulacrum-7/+33
2018-02-10Add comment about the problem, and use provided path if availableroblabla-1/+8
2018-02-11Rollup merge of #48120 - matthiaskrgr:typos_src_1, r=alexcrichtonkennytm-3/+3
fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} via codespell
2018-02-10fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}}Matthias Krüger-3/+3
2018-02-10Rollup merge of #48098 - alexcrichton:fix-i686-dist-bootstrap, r=Mark-Simulacrumkennytm-0/+7
ci: Actually bootstrap on i686 dist Right now the `--build` option was accidentally omitted, so we're bootstraping from `x86_64` to `i686`. In addition to being slower (more compiles) that's not actually bootstrapping!
2018-02-10Rollup merge of #48059 - alexcrichton:sccachebs, r=Mark-Simulacrumkennytm-5/+22
rustbuild: Pass `ccache` to build scripts Right now the ccache setting is only used for LLVM, but this tweaks it to also be used for build scripts so C++ builds like `librustc_llvm` can be a bit speedier.
2018-02-10Rollup merge of #48015 - o01eg:disableable-installation, r=alexcrichtonkennytm-8/+28
Customizable extended tools This PR adds `build.tools` option to manage installation of extended rust tools. By default it doesn't change installation. All tools are built and `rls` and `rustfmt` allowed to fail installation. If some set of tools chosen only those tools are built and installed without any fails allowed. It solves some slotting issues with extended build enabled: https://bugs.gentoo.org/show_bug.cgi?id=645498
2018-02-09rustc: Upgrade to LLVM 6Alex Crichton-1/+1
The following submodules have been updated for a new version of LLVM: - `src/llvm` - `src/libcompiler_builtins` - transitively contains compiler-rt - `src/dlmalloc` This also updates the docker container for dist-i686-freebsd as the old 16.04 container is no longer capable of building LLVM. The compiler-rt/compiler-builtins and dlmalloc updates are pretty routine without much interesting happening, but the LLVM update here is of particular note. Unlike previous updates I haven't cherry-picked all existing patches we had on top of our LLVM branch as we have a [huge amount][patches4] and have at this point forgotten what most of them are for. Instead I started from the current `release_60` branch in LLVM and only applied patches that were necessary to get our tests working and building. The current set of custom rustc-specific patches included in this LLVM update are: * rust-lang/llvm@1187443 - this is how we actually implement `cfg(target_feature)` for now and continues to not be upstreamed. While a hazard for SIMD stabilization this commit is otherwise keeping the status quo of a small rustc-specific feature. * rust-lang/llvm@013f2ec - this is a rustc-specific optimization that we haven't upstreamed, notably teaching LLVM about our allocation-related routines (which aren't malloc/free). Once we stabilize the global allocator routines we will likely want to upstream this patch, but for now it seems reasonable to keep it on our fork. * rust-lang/llvm@a65bbfd - I found this necessary to fix compilation of LLVM in our 32-bit linux container. I'm not really sure why it's necessary but my guess is that it's because of the absolutely ancient glibc that we're using. In any case it's only updating pieces we're not actually using in LLVM so I'm hoping it'll turn out alright. This doesn't seem like something we'll want to upstream.c * rust-lang/llvm@77ab1f0 - this is what's actually enabling LLVM to build in our i686-freebsd container, I'm not really sure what's going on but we for sure probably don't want to upstream this and otherwise it seems not too bad for now at least. * rust-lang/llvm@9eb9267 - we currently suffer on MSVC from an [upstream bug] which although diagnosed to a particular revision isn't currently fixed upstream (and the bug itself doesn't seem too active). This commit is a partial revert of the suspected cause of this regression (found via a bisection). I'm sort of hoping that this eventually gets fixed upstream with a similar fix (which we can replace in our branch), but for now I'm also hoping it's a relatively harmless change to have. After applying these patches (plus one [backport] which should be [backported upstream][llvm-back]) I believe we should have all tests working on all platforms in our current test suite. I'm like 99% sure that we'll need some more backports as issues are reported for LLVM 6 when this propagates through nightlies, but that's sort of just par for the course nowadays! In any case though some extra scrutiny of the patches here would definitely be welcome, along with scrutiny of the "missing patches" like a [change to pass manager order](rust-lang/llvm@27174447533), [another change to pass manager order](rust-lang/llvm@c782febb7b9), some [compile fixes for sparc](rust-lang/llvm@1a83de63c42), and some [fixes for solaris](rust-lang/llvm@c2bfe0abb). [patches4]: https://github.com/rust-lang/llvm/compare/5401fdf23...rust-llvm-release-4-0-1 [backport]: https://github.com/rust-lang/llvm/commit/5c54c252db [llvm-back]: https://bugs.llvm.org/show_bug.cgi?id=36114 [upstream bug]: https://bugs.llvm.org/show_bug.cgi?id=36096 --- The update to LLVM 6 is desirable for a number of reasons, notably: * This'll allow us to keep up with the upstream wasm backend, picking up new features as they start landing. * Upstream LLVM has fixed a number of SIMD-related compilation errors, especially around AVX-512 and such. * There's a few assorted known bugs which are fixed in LLVM 5 and aren't fixed in the LLVM 4 branch we're using. * Overall it's not a great idea to stagnate with our codegen backend! This update is mostly powered by #47730 which is allowing us to update LLVM *independent* of the version of LLVM that Emscripten is locked to. This means that when compiling code for Emscripten we'll still be using the old LLVM 4 backend, but when compiling code for any other target we'll be using the new LLVM 6 target. Once Emscripten updates we may no longer need this distinction, but we're not sure when that will happen! Closes #43370 Closes #43418 Closes #47015 Closes #47683 Closes rust-lang-nursery/stdsimd#157 Closes rust-lang-nursery/rust-wasm#3
2018-02-09ci: Actually bootstrap on i686 distAlex Crichton-0/+7
Right now the `--build` option was accidentally omitted, so we're bootstraping from `x86_64` to `i686`. In addition to being slower (more compiles) that's not actually bootstrapping!