summary refs log tree commit diff
path: root/src/bootstrap/dist.rs
AgeCommit message (Collapse)AuthorLines
2018-03-25Rollup merge of #49290 - cuviper:unextended-dist-rustfmt, r=nikomatsakiskennytm-1/+0
Allow installing rustfmt without config.extended This assertion was preventing `./x.py install rustfmt` if attempted without an "extended" build configuration, but it actually builds and installs just fine.
2018-03-25Rollup merge of #49193 - davidtwco:issue-29893, r=alexcrichtonkennytm-7/+62
Host compiler documentation Fixes #29893. Rust Central Station PR: rust-lang/rust-central-station#40 r? @alexcrichton
2018-03-22Allow installing rustfmt without config.extendedJosh Stone-1/+0
This assertion was preventing `./x.py install rustfmt` if attempted without an "extended" build configuration, but it actually builds and installs just fine.
2018-03-22Remove std/test documentation from compiler docs.David Wood-2/+2
2018-03-21Add support to rustbuild for a 'rustc docs' component tarballDavid Wood-7/+62
2018-03-18rustbuild: Ship libsynchronizationMaxim Nazarenko-0/+1
Ship libsynchronization from MinGW
2018-03-17Rollup merge of #49055 - alexcrichton:ship-more-libs, r=nikomatsakiskennytm-2/+4
rustbuild: Add more MinGW libraries to ship Closes #49044
2018-03-16Automatically enable the `clippy` feature of `rls` if clippy buildsOliver Schneider-3/+3
2018-03-16rustbuild: Add more MinGW libraries to shipAlex Crichton-2/+4
Closes #49044
2018-03-08Remove ONLY_BUILD_TARGETS.Mark Simulacrum-18/+3
All cases where it is used can be replaced by substituing run.host for run.builder.build.build; that is its only effect. As such, it is removable.
2018-03-04Include stdsimd in rust-src componentAlex Crichton-0/+1
Closes #48734
2018-03-03rustc: Tweak default linker selectionAlex Crichton-2/+4
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-1/+17
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-02make codegen-backends directory name configurableMarc-Antoine Perennou-1/+2
This allows to parallel-install several versions of rust system-wide Fixes #48263 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-02-10Remove DontDistWithMiri struct and instead just directly check it in builderMark Simulacrum-25/+0
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!
2018-02-05Use time crate in bootstrap dist instead of dateOnur Aslan-3/+3
2018-01-31rustc: Move location of `codegen-backends` dirAlex Crichton-5/+3
Right now this directory is located under: $sysroot/lib/rustlib/$target/lib/codegen-backends but after seeing what we do in a few other places it seems that a more appropriate location would be: $sysroot/lib/rustlib/$target/codegen-backends so this commit moves it!
2018-01-27rustc: Load the `rustc_trans` crate at runtimeAlex Crichton-1/+12
Building on the work of # 45684 this commit updates the compiler to unconditionally load the `rustc_trans` crate at runtime instead of linking to it at compile time. The end goal of this work is to implement # 46819 where rustc will have multiple backends available to it to load. This commit starts off by removing the `extern crate rustc_trans` from the driver. This involved moving some miscellaneous functionality into the `TransCrate` trait and also required an implementation of how to locate and load the trans backend. This ended up being a little tricky because the sysroot isn't always the right location (for example `--sysroot` arguments) so some extra code was added as well to probe a directory relative to the current dll (the rustc_driver dll). Rustbuild has been updated accordingly as well to have a separate compilation invocation for the `rustc_trans` crate and assembly it accordingly into the sysroot. Finally, the distribution logic for the `rustc` package was also updated to slurp up the trans backends folder. A number of assorted fallout changes were included here as well to ensure tests pass and such, and they should all be commented inline.
2018-01-19Automaticaly calculate beta prerelease numbersAlex Crichton-1/+0
This is a forward-port of: * 9426dda83d7a928d6ced377345e14b84b0f11c21 * cbfb9858951da7aee22d82178405306fca9decb1 from the beta branch which is used to automatically calculate the beta number based on the number of merges to the beta branch so far.
2018-01-17Update Cargo and its dependenciesAlex Crichton-0/+2
This'll probably have a bunch of build errors, so let's try and head those off and find them sooner rather than later!
2017-12-27Revert "Add a file to trivially disable tool building or testing"kennytm-10/+0
This reverts commit ab018c76e14b87f3c9e0b7384cc9b02d94779cd5. This also adds the `ToolBuild::is_ext_tool` field to replace the previous `ToolBuild::expectation` field, to indicate whether a build-failure of certain tool is essential.
2017-12-17Distribute intrinsic.natvis with the compiler for windows-msvc.Antal Szabó-0/+1
2017-12-04template month/year, version into man pages while building dist tarballZack M. Davis-2/+17
This is meant to resolve #25689.
2017-11-22Always ignore build failure of failable tools (rls, rustfmt, clippy, miri).kennytm-3/+5
If build failed for these tools, they will be automatically skipped from distribution, and will not fail the whole build. Test failures are *not* ignored, nor build failure of other tools (e.g. cargo). Therefore it should have no observable effect to the current CI system. This is step 1/8 of automatic management of broken tools #45861.
2017-11-22Rollup merge of #46031 - Keruspe:cargofmt, r=Mark-Simulacrumkennytm-0/+5
rustbuild: distribute cargo-fmt alongside rustfmt Not sure whether we want that nor if it's the right way to do so, but it feels quite weird to have rustfmt without cargo-fmt. Or are there other plans wrt that? What do you think @nrc ?
2017-11-20rustbuild: fix expectation messageMarc-Antoine Perennou-1/+1
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-11-19std: Add a new wasm32-unknown-unknown targetAlex Crichton-0/+5
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: dist cargo-fmt as part of rustfmtMarc-Antoine Perennou-0/+5
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-11-16Fix a bug where the rustfmt tarball was not being producedNick Cameron-2/+5
2017-11-13review changesNick Cameron-1/+1
2017-11-13Distribute RustfmtNick Cameron-0/+89
2017-11-08std: Remove `rand` crate and moduleAlex Crichton-1/+0
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-10-22Remove deprecated `collections` crate.leonardo.yvens-1/+0
This reverts commit 6484258f1749499d3e51685df867b3d460a7f0be.
2017-10-20Auto merge of #44792 - Mark-Simulacrum:correct-deps, r=alexcrichtonbors-1/+3
Make sure to clear out the stageN-{rustc,std,tools} directories. We copy built tool binaries into a dedicated directory to avoid deleting them, stageN-tools-bin. These aren't ever cleared out by code, since there should be no reason to do so, and we'll simply overwrite them as necessary. When clearing out the stageN-{std,rustc,tools} directories, make sure to delete both Cargo directories -- per-target and build scripts. This ensures that changing libstd doesn't cause problems due to build scripts not being rebuilt, even though they should be. Fixes https://github.com/rust-lang/rust/issues/44739.
2017-10-19Make tools which may not build return Option.Mark Simulacrum-1/+3
This makes it mandatory for other steps to have to handle the potential failure instead of failing in an odd way later down the road.
2017-10-19rustbuild: fix dist in debug modeMarc-Antoine Perennou-1/+1
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-10-16rustbuild: Allow setting rls/rustfmt to "broken"Alex Crichton-88/+108
This commit enables configuring the RLS/rustfmt tools to the "broken" state and actually get it past CI. The main changes here were to update all dist-related code to handle the situation where the RLS isn't available. This in turn involved a homegrown preprocessor-like-function to edit the configuration files we pass to the various combined installer tools.
2017-10-09cleanup: rustc doesn't use an external archiverVadim Petrochenkov-1/+1
2017-09-27Rename rls component to rls-preview on nightlyNick Cameron-13/+4
2017-09-17Prevent distribution if miri is enabledOliver Schneider-0/+25
2017-09-14Attempt to fix the component manifest problem for rls-previewNick Cameron-4/+13
cc #44270
2017-09-12Auto merge of #44413 - est31:move_man, r=nikomatsakisbors-2/+1
Move the man directory to a subdirectory There is no reason it should be in the top directory.
2017-09-11rustbuild: Fix a distribution bug with rustdocAlex Crichton-0/+1
Apparently `File::create` was called when there was an existing hard link or the like, causing an existing file to get accidentally truncated! Closes #44487
2017-09-09rustbuild: Switch back to using hard linksAlex Crichton-2/+6
The `copy` function historically in rustbuild used hard links to speed up the copy operations that it does. This logic was backed out, however, in #39518 due to a bug that only showed up on Windows, described in #39504. The cause described in #39504 happened because Cargo, on a fresh build, would overwrite the previous artifacts with new hard links that Cargo itself manages. This behavior in Cargo was fixed in rust-lang/cargo#4390 where it no longer should overwrite files on fresh builds, opportunistically leaving the filesystem intact and not touching it. Hopefully this can help speed up local builds by doing fewer copies all over the place!
2017-09-08Move the man directory to a subdirectoryest31-2/+1
There is no reason it should be in the top directory.
2017-09-06Rollup merge of #44321 - ↵Mark Simulacrum-1/+4
jakllsch:jakllsch-4f2d6c87-2674-43e4-9c5f-2415136e6bdc, r=Mark-Simulacrum bootstrap: only include docs in extended distribution if enabled Fixes #44163
2017-09-06Rollup merge of #44218 - SimonSapin:commit-hash, r=alexcrichtonMark Simulacrum-0/+9
Add full git commit hash to release channel manifests The full hash is necessary to build the download URL for "alternate" compiler builds. This is a first step for https://github.com/rust-lang-nursery/rustup.rs/issues/1099.
2017-09-04bootstrap: only include docs in extended distribution if enabledJonathan A. Kollasch-1/+4
Issue #44163
2017-09-04Only include git-commit-hash in tarballs when availableSimon Sapin-6/+9
… instead of writing an empty file.