summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2017-12-14rustbuild: Fix a typo with the Cargo bookAlex Crichton-1/+1
The usage of `Path::new` prevented out-of-tree builds (like the bots do) from working by accident! Closes #46195
2017-12-07Bump beta to .2.Ralph Giles-1/+1
2017-11-21rustbuild: Allow using unstable rustdoc features on betaAlex Crichton-1/+2
I believe this was forgotten from #45191 but hopefully is a simple fix!
2017-11-20Auto merge of #45998 - ollie27:doc_book_css, r=steveklabnikbors-16/+11
Fix broken CSS for book redirect pages rust.css has to be next to the font files so we shouldn't copy it for only the book redirect pages, instead just use the version that is already there. This also removes the duplicate code creating version_info.html. Fixes: #45974
2017-11-20Auto merge of #45905 - alexcrichton:add-wasm-target, r=aturonbors-1/+7
std: Add a new wasm32-unknown-unknown target This commit adds a new target to the compiler: wasm32-unknown-unknown. This target is a reimagining of what it looks like to generate WebAssembly code from Rust. Instead of using Emscripten which can bring with it a weighty runtime this instead is a target which uses only the LLVM backend for WebAssembly and a "custom linker" for now which will hopefully one day be direct calls to lld. Notable features of this target include: * There is zero runtime footprint. The target assumes nothing exists other than the wasm32 instruction set. * There is zero toolchain footprint beyond adding the target. No custom linker is needed, rustc contains everything. * Very small wasm modules can be generated directly from Rust code using this target. * Most of the standard library is stubbed out to return an error, but anything related to allocation works (aka `HashMap`, `Vec`, etc). * Naturally, any `#[no_std]` crate should be 100% compatible with this new target. This target is currently somewhat janky due to how linking works. The "linking" is currently unconditional whole program LTO (aka LLVM is being used as a linker). Naturally that means compiling programs is pretty slow! Eventually though this target should have a linker. This target is also intended to be quite experimental. I'm hoping that this can act as a catalyst for further experimentation in Rust with WebAssembly. Breaking changes are very likely to land to this target, so it's not recommended to rely on it in any critical capacity yet. We'll let you know when it's "production ready". ### Building yourself First you'll need to configure the build of LLVM and enable this target ``` $ ./configure --target=wasm32-unknown-unknown --set llvm.experimental-targets=WebAssembly ``` Next you'll want to remove any previously compiled LLVM as it needs to be rebuilt with WebAssembly support. You can do that with: ``` $ rm -rf build ``` And then you're good to go! A `./x.py build` should give you a rustc with the appropriate libstd target. ### Test support Currently testing-wise this target is looking pretty good but isn't complete. I've got almost the entire `run-pass` test suite working with this target (lots of tests ignored, but many passing as well). The `core` test suite is [still getting LLVM bugs fixed](https://reviews.llvm.org/D39866) to get that working and will take some time. Relatively simple programs all seem to work though! In general I've only tested this with a local fork that makes use of LLVM 5 rather than our current LLVM 4 on master. The LLVM 4 WebAssembly backend AFAIK isn't broken per se but is likely missing bug fixes available on LLVM 5. I'm hoping though that we can decouple the LLVM 5 upgrade and adding this wasm target! ### But the modules generated are huge! It's worth nothing that you may not immediately see the "smallest possible wasm module" for the input you feed to rustc. For various reasons it's very difficult to get rid of the final "bloat" in vanilla rustc (again, a real linker should fix all this). For now what you'll have to do is: cargo install --git https://github.com/alexcrichton/wasm-gc wasm-gc foo.wasm bar.wasm And then `bar.wasm` should be the smallest we can get it! --- In any case for now I'd love feedback on this, particularly on the various integration points if you've got better ideas of how to approach them!
2017-11-19std: Add a new wasm32-unknown-unknown targetAlex Crichton-1/+7
This commit adds a new target to the compiler: wasm32-unknown-unknown. This target is a reimagining of what it looks like to generate WebAssembly code from Rust. Instead of using Emscripten which can bring with it a weighty runtime this instead is a target which uses only the LLVM backend for WebAssembly and a "custom linker" for now which will hopefully one day be direct calls to lld. Notable features of this target include: * There is zero runtime footprint. The target assumes nothing exists other than the wasm32 instruction set. * There is zero toolchain footprint beyond adding the target. No custom linker is needed, rustc contains everything. * Very small wasm modules can be generated directly from Rust code using this target. * Most of the standard library is stubbed out to return an error, but anything related to allocation works (aka `HashMap`, `Vec`, etc). * Naturally, any `#[no_std]` crate should be 100% compatible with this new target. This target is currently somewhat janky due to how linking works. The "linking" is currently unconditional whole program LTO (aka LLVM is being used as a linker). Naturally that means compiling programs is pretty slow! Eventually though this target should have a linker. This target is also intended to be quite experimental. I'm hoping that this can act as a catalyst for further experimentation in Rust with WebAssembly. Breaking changes are very likely to land to this target, so it's not recommended to rely on it in any critical capacity yet. We'll let you know when it's "production ready". --- Currently testing-wise this target is looking pretty good but isn't complete. I've got almost the entire `run-pass` test suite working with this target (lots of tests ignored, but many passing as well). The `core` test suite is still getting LLVM bugs fixed to get that working and will take some time. Relatively simple programs all seem to work though! --- It's worth nothing that you may not immediately see the "smallest possible wasm module" for the input you feed to rustc. For various reasons it's very difficult to get rid of the final "bloat" in vanilla rustc (again, a real linker should fix all this). For now what you'll have to do is: cargo install --git https://github.com/alexcrichton/wasm-gc wasm-gc foo.wasm bar.wasm And then `bar.wasm` should be the smallest we can get it! --- In any case for now I'd love feedback on this, particularly on the various integration points if you've got better ideas of how to approach them!
2017-11-16rustbuild: Install rustfmt as part of extended buildMarc-Antoine Perennou-1/+12
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-11-16Auto merge of #46025 - nrc:rustfmt-fix, r=Mark-Simulacrumbors-2/+5
Fix a bug where the rustfmt tarball was not being produced r? @alexcrichton This makes rustfmt a dep of 'extended', which seems to be necessary for the rustfmt dist step to actually get run.
2017-11-16Fix a bug where the rustfmt tarball was not being producedNick Cameron-2/+5
2017-11-16Auto merge of #45692 - steveklabnik:ship-cargo-book, r=alexcrichtonbors-45/+46
Start shipping the Cargo book Fixes #44910 Fixes #39588 See both of those bugs for more details.
2017-11-15Reenable clippy testingOliver Schneider-0/+4
2017-11-15Fix broken CSS for book redirect pagesOliver Middleton-16/+11
rust.css has to be next to the font files so we shouldn't copy it for only the book redirect pages, instead just use the version that is already there. This also removes the duplicate code creating version_info.html.
2017-11-14link the cargo book into the bookshelfsteveklabnik-3/+6
2017-11-14Start shipping the Cargo booksteveklabnik-45/+43
Fixes #44910 Fixes #39588 See both of those bugs for more details.
2017-11-13Auto merge of #45903 - nrc:rustfmt-dist, r=alexcrichtonbors-1/+99
Distribute Rustfmt r? @alexcrichton
2017-11-13Auto merge of #45810 - SimonSapin:ac-dc, r=aturonbors-1/+1
Disable LLVM assertions on Nightly, enable them in "alt" builds. Per IRC discussion https://mozilla.logbot.info/rust-infra/20171106#c13812170-c13812204 Background: https://internals.rust-lang.org/t/disabling-llvm-assertions-in-nightly-builds/5388/14
2017-11-13review changesNick Cameron-1/+1
2017-11-13Distribute RustfmtNick Cameron-1/+99
2017-11-12Auto merge of #45908 - alexcrichton:disable-thinlto-libtest, r=Mark-Simulacrumbors-0/+1
rustbuild: Disable ThinLTO for libtest Right now ThinLTO is generating bad dwarf which is tracked by #45511, but this is causing issues on OSX (#45768) where `dsymutil` is segfaulting and failing to produce output. Closes #45768
2017-11-11Disable LLVM assertions on Nightly, enable them in "alt" builds.Simon Sapin-1/+1
2017-11-11Auto merge of #45806 - alexcrichton:update-llvm-for-mips, r=michaelwoeristerbors-2/+1
rustbuild: Re-enable ThinLTO for MIPS Now that the upstream LLVM bug is now fixed this commit cherry-picks the commit onto our LLVM and then re-enables the ThinLTO paths for MIPS. Closes #45654
2017-11-10rustbuild: Disable ThinLTO for libtestAlex Crichton-0/+1
Right now ThinLTO is generating bad dwarf which is tracked by #45511, but this is causing issues on OSX (#45768) where `dsymutil` is segfaulting and failing to produce output. Closes #45768
2017-11-08std: Remove `rand` crate and moduleAlex Crichton-9/+10
This commit removes the `rand` crate from the standard library facade as well as the `__rand` module in the standard library. Neither of these were used in any meaningful way in the standard library itself. The only need for randomness in libstd is to initialize the thread-local keys of a `HashMap`, and that unconditionally used `OsRng` defined in the standard library anyway. The cruft of the `rand` crate and the extra `rand` support in the standard library makes libstd slightly more difficult to port to new platforms, namely WebAssembly which doesn't have any randomness at all (without interfacing with JS). The purpose of this commit is to clarify and streamline randomness in libstd, focusing on how it's only required in one location, hashmap seeds. Note that the `rand` crate out of tree has almost always been a drop-in replacement for the `rand` crate in-tree, so any usage (accidental or purposeful) of the crate in-tree should switch to the `rand` crate on crates.io. This then also has the further benefit of avoiding duplication (mostly) between the two crates!
2017-11-07Rollup merge of #45588 - Keruspe:master, r=alexcrichtonkennytm-2/+5
rustbuild: don't try to install rls if ToolState is not Testing We already do that for the Dist Step so we would end up trying to install something that we didn't dist.
2017-11-06rustbuild: Re-enable ThinLTO for MIPSAlex Crichton-2/+1
Now that the upstream LLVM bug is now fixed this commit cherry-picks the commit onto our LLVM and then re-enables the ThinLTO paths for MIPS. Closes #45654
2017-11-06Ensure dist::Std for every libstd target. (Closes: #42320)Ximin Luo-9/+9
This fixes cross-compile installation. Half of the logic is actually in there already in install.rs:install_std but it fails with an error like: sh: 0: Can't open /<<BUILDDIR>>/rustc-1.21.0+dfsg1/build/tmp/dist/rust-std-1.21.0-powerpc64le-unknown-linux-gnu/install.sh because the target-arch dist tarball wasn't built as well.
2017-11-04rustbuild: Update the OpenSSL version to linkAlex Crichton-2/+2
This updates the OpenSSL tarball download to reflect OpenSSL's newest release.
2017-11-04rustbuild: don't try to install rls if ToolState is not TestingMarc-Antoine Perennou-2/+5
The Dist Step is not ran in that case so we would end up trying to install something that we didn't dist. Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-11-04Rollup merge of #45548 - ratmice:master, r=oli-obkkennytm-1/+2
issue #45357 don't build clippy stage 1 #45357 Wasn't sure top_stage was the right thing, but seemed to go ahead building clippy stage 2.
2017-11-03issue #45357 set clippy build condition to extended.matt rice-4/+2
2017-11-01Rollup merge of #45624 - glaubitz:bootstrap-sparc64, r=kennytmkennytm-1/+1
bootstrap: Add missing cputype matching for sparc64 Trying to configure rust natively on sparc64-unknown-linux-gnu currently fails with: ``` root@deb4g:/local_scratch/glaubitz/rust/rust# ./configure --host=sparc64-unknown-linux-gnu --enable-local-rust --local-rust-root=/usr/local configure: processing command line configure: configure: build.host := ['sparc64-unknown-linux-gnu'] configure: build.rustc := /usr/local/bin/rustc configure: build.cargo := /usr/local/bin/cargo configure: build.rustc := /usr/local/bin/rustc configure: build.cargo := /usr/local/bin/cargo configure: build.configure-args := ['--host=sparc64-unknown-linux-gnu', '--enable ... unknown cpu type: sparc64 root@deb4g:/local_scratch/glaubitz/rust/rust# ``` This is trivially fixed by defining sparc64 as a valid cputype.
2017-11-01Rollup merge of #45619 - mneumann:fix-bootstrap-dragonfly, r=alexcrichtonkennytm-0/+1
Support Dragonfly when building Openssl
2017-10-31bootstrap: Add missing cputype matching for sparc64John Paul Adrian Glaubitz-1/+1
2017-10-31rustbuild: Don't build with ThinLTO on MIPSAlex Crichton-6/+8
Discovered in #45529 it looks like cross-module TLS imports aren't quite working today, especially with `hidden` visibility which mostly comes up with multiple codegen units. As a result this completely disables compiling with ThinLTO and multiple codegen units on MIPS when bootstrapping. cc #45654, the tracking issue for this
2017-10-29Support Dragonfly when building OpensslMichael Neumann-0/+1
2017-10-29ci: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager.kennytm-4/+31
* SDK tools is upgraded to 27.0.0. - Refactored to use `sdkmanager`/`avdmanager` instead of the deprecated `android` tool. * The Java version used by Android SDK is downgraded to OpenJDK-8, in order to download the SDK through HTTPS. * NDK is upgrade to r15c. - Dropped support for android-9 (2.3 / Gingerbread), the minimal supported version is now android-14 (4.0 / Ice Cream Sandwich). - Changed the default Android compiler from GCC to clang. - For details of change introduced by NDK r15, see https://github.com/android-ndk/ndk/wiki/Changelog-r15.
2017-10-28Auto merge of #45589 - kennytm:rollup, r=kennytmbors-2/+5
Rollup of 7 pull requests - Successful merges: #45421, #45449, #45505, #45535, #45549, #45574, #45585 - Failed merges:
2017-10-28Rollup merge of #45535 - topecongiro:bootstrap-exit-code, r=kennytmkennytm-2/+5
Return 0 as an exit status when no subcommand is given to bootstrap Running `./x.py` emits usage and error messages when no subcommand is given: ``` Usage: x.py <subcommand> [options] [<paths>...] Subcommands: build Compile either the compiler or libraries test Build and run some test suites bench Build and run some benchmarks doc Build documentation clean Clean out build directories dist Build distribution artifacts install Install distribution artifacts To learn more about a subcommand, run `./x.py <subcommand> -h` failed to run: /home/topecongiro/rust/build/bootstrap/debug/bootstrap ``` IMHO the last line is unnecessary. This PR removes it by changing the return code of `bootstrap` to 0 when no sub command is given.
2017-10-28Auto merge of #45566 - cuviper:option-checking, r=alexcrichtonbors-4/+14
configure.py: fix --disable-option-checking and extra config paths - indexing 'option-checking' out of `known_args` had a type error - when option checking is disabled, don't error on duplicate args, just take the last - add config.toml stubs for datadir, infodir, and localstatedir (which were already accepted, but broken) --- This fixes a regression from 1.21 to beta, when the configure script was rewritten in python.
2017-10-27Return 0 when ./x.py has no subcommandtopecongiro-2/+5
2017-10-26config.toml: Add stubs for recognized-but-unused install pathsJosh Stone-0/+5
... specifically `datadir`, `infodir`, and `localstatedir`. These were already accepted by `configure.py`, but it didn't have any place to put the values.
2017-10-26configure.py: fix --disable-option-checkingJosh Stone-4/+9
Getting the value of this argument needs another level of indexing, as `known_args` are stored in `{dict}[list](opt, value)` form. Also, when option-checking is disabled, let this bypass the check that options are only passed once, and just apply the last value.
2017-10-26Bump to 1.23 and update bootstrapAlex Crichton-1/+1
This commit updates the bootstrap compiler, bumps the version to 1.23, updates Cargo, updates books, and updates crates.io dependencies
2017-10-26issue #45357 don't build clippy stage 1matt rice-1/+4
2017-10-26Rollup merge of #45496 - kennytm:bootstrap-fix-extension-check, r=alexcrichtonkennytm-4/+12
rustbuild: Fix `no output generated` error for next bootstrap cargo. Due to rust-lang/cargo#4570, a `*.dll.lib` file is uplifted when building dynamic libraries on Windows. The current bootstrap code does not understand files with multiple extensions, and will instead assume `xxxx.dll` is the file name. This caused a `no output generated` error because it tries to search for `xxxx.dll-hash.lib` inside the `deps/` folder, while it should check for `xxxx-hash.dll.lib` instead. This PR is blocking #45285, see https://github.com/rust-lang/rust/pull/45285#issuecomment-338454149 and the rest of the comments for detail.
2017-10-25Rollup merge of #45465 - glaubitz:sparc64, r=alexcrichtonGuillaume Gomez-0/+1
bootstrap: Add openssl configuration for sparc64-unknown-linux-gnu Hi! This adds the target missing mapping for sparc64-unknown-linux-gnu. See: https://github.com/rust-lang/rust/issues/45456 Thanks
2017-10-24Auto merge of #44603 - SimonSapin:stylo, r=alexcrichtonbors-1/+0
Add Stylo and WebRender to src/tools/cargotest This is a subset of Servo that takes relatively less time to compile and does not use unstable Rust features.
2017-10-24Auto merge of #45446 - leodasvacas:remove-libcollections, r=alexcrichtonbors-2/+1
Remove deprecated `collections` crate. The real `collections` was merged with `alloc`, this facade was introduced [in this PR](https://github.com/rust-lang/rust/pull/42720) to give `#[no_std]` users time to adapt. This was done at least two cycles ago, now we can consider removing it for good.
2017-10-25rustbuild: Fix `no output generated` error for next bootstrap cargo.kennytm-4/+12
Due to rust-lang/cargo#4570, a `*.dll.lib` file is uplifted when building dynamic libraries on Windows. The current bootstrap code does not understand files with multiple extensions, and will instead assume `xxxx.dll` is the file name. This caused a `no output generated` error because it tries to search for `xxxx.dll-hash.lib` inside the `deps/` folder, while it should check for `xxxx-hash.dll.lib` instead. This PR is blocking #45285 (Bump to 1.23 and update bootstrap).
2017-10-24bootstrap: Add openssl configuration for sparc64-unknown-linux-gnuJohn Paul Adrian Glaubitz-0/+1