about summary refs log tree commit diff
path: root/src/bootstrap/bin
AgeCommit message (Collapse)AuthorLines
2017-07-16Compile `compiler_builtins` with `abort` panic strategyVadim Petrochenkov-1/+6
2017-07-06Auto merge of #42899 - alexcrichton:compiler-builtins, r=nikomatsakisbors-4/+15
Switch to rust-lang-nursery/compiler-builtins This commit migrates the in-tree `libcompiler_builtins` to the upstream version at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version has a number of intrinsics written in Rust and serves as an in-progress rewrite of compiler-rt into Rust. Additionally it also contains all the existing intrinsics defined in `libcompiler_builtins` for 128-bit integers. It's been the intention since the beginning to make this transition but previously it just lacked the manpower to get done. As this PR likely shows it wasn't a trivial integration! Some highlight changes are: * The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes across platforms and also some refactorings to make the intrinsics easier to read. The additional testing added there also fixed a number of integration issues when pulling the repository into this tree. * LTO with the compiler-builtins crate was fixed to link in the entire crate after the LTO process as these intrinsics are excluded from LTO. * Treatment of hidden symbols was updated as previously the `#![compiler_builtins]` crate would mark all symbol *imports* as hidden whereas it was only intended to mark *exports* as hidden.
2017-07-05Switch to rust-lang-nursery/compiler-builtinsAlex Crichton-4/+15
This commit migrates the in-tree `libcompiler_builtins` to the upstream version at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version has a number of intrinsics written in Rust and serves as an in-progress rewrite of compiler-rt into Rust. Additionally it also contains all the existing intrinsics defined in `libcompiler_builtins` for 128-bit integers. It's been the intention since the beginning to make this transition but previously it just lacked the manpower to get done. As this PR likely shows it wasn't a trivial integration! Some highlight changes are: * The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes across platforms and also some refactorings to make the intrinsics easier to read. The additional testing added there also fixed a number of integration issues when pulling the repository into this tree. * LTO with the compiler-builtins crate was fixed to link in the entire crate after the LTO process as these intrinsics are excluded from LTO. * Treatment of hidden symbols was updated as previously the `#![compiler_builtins]` crate would mark all symbol *imports* as hidden whereas it was only intended to mark *exports* as hidden.
2017-07-04Update a few comments.Mark Simulacrum-10/+5
2017-06-22Rollup merge of #42806 - ollie27:rustbuild_compiler_docs, r=alexcrichtonMark Simulacrum-5/+5
rustbuild: Fix compiler docs yet again Add support for `-Z force-unstable-if-unmarked` to rustdoc. r? @alexcrichton
2017-06-22Rollup merge of #42804 - Mark-Simulacrum:rustbuild-colors, r=alexcrichtonMark Simulacrum-0/+9
Make rustc errors colorful. Rustbuild passes --message-format=json to Cargo to learn about the dependencies for a given build, which then makes Cargo steal the stderr/stdout for the compiler process, leading to non colorful output. To avoid this, detection of stderr being a tty is added to rustbuild, and an environment variable is used to communicate with the rustc shim. Fixes https://github.com/rust-lang/rust/issues/42801. r? @alexcrichton
2017-06-21rustbuild: Fix compiler docs yet againOliver Middleton-5/+5
Add support for `-Z force-unstable-if-unmarked` to rustdoc.
2017-06-21Make rustc errors colorful.Mark Simulacrum-0/+9
Rustbuild passes --message-format=json to Cargo to learn about the dependencies for a given build, which then makes Cargo steal the stderr/stdout for the compiler process, leading to non colorful output. To avoid this, detection of stderr being a tty is added to rustbuild, and an environment variable is used to communicate with the rustc shim.
2017-06-20Fixes bootstrapping with custom cargo/rustc.Mark Simulacrum-7/+1
config.mk is now always read when parsing the configuration to prevent this from reoccurring in the future, hopefully.
2017-06-19Bump version and stage0 compilerAlex Crichton-17/+2
2017-06-02rustbuild: Remove RUSTFLAGS logic in rustc shimAlex Crichton-6/+0
This was added in #38072 but I can't recall why and AFAIK Cargo already handles this. This was discovered through #42146 where passing duplicate flags was causing problems.
2017-05-30rustbuild: Fix copying duplicate crates into the sysrootAlex Crichton-0/+7
After compiling a project (e.g. libstd, libtest, or librustc) rustbuild needs to copy over all artifacts into the sysroot of the compiler it's assembling. Unfortunately rustbuild doesn't know precisely what files to copy! Today it has a heuristic where it just looks at the most recent version of all files that look like rlibs/dylibs and copies those over. This unfortunately leads to bugs with different versions of the same craet as seen in #42261. This commit updates rustbuild's strategy of copying artifacts to work off the list of artifacts produced by `cargo build --message-format=json`. The build system will now parse json messages coming out of Cargo to watch for files being generated, and then it'll only copy over those precise files. Note that there's still a bit of weird logic where Cargo prints that it's creating `libstd.rlib` where we actually want `libstd-xxxxx.rlib`, so we still do a bit of "most recent file" probing for those. This commit should take care of the crates.io dependency issues, however, as they're all copied over precisely. Closes #42261
2017-05-18Add metadata suffix, close rust-lang/cargo#4028Tatsuyuki Ishi-1/+18
2017-05-11rustbuild: Use `-Z force-unstable-if-unmarked`Alex Crichton-0/+13
2017-04-27appveyor: Use Ninja/sccache on MSVCAlex Crichton-0/+43
Now that the final bug fixes have been merged into sccache we can start leveraging sccache on the MSVC builders on AppVeyor instead of relying on the ad-hoc caching strategy of trigger files and whatnot.
2017-03-27rustbuild: Fix compiler docs againOliver Middleton-0/+8
The docs need to be built with the rustbuild feature so the correct stability attributes (rustc_private) get applied.
2017-03-19Rollup merge of #40554 - nrc:rls-data, r=alexcrichtonCorey Farwell-0/+7
Use rls-data crate This basically pulls out a bunch of data structures used by save-analysis for serialization into an external crate, and pulls that crate in using Rustbuild. The RLS can then share these data structures with the compiler which in some cases will allow more efficient communication between the compiler and the RLS (i.e., without serialisation). Along the way, I have to pull in rls-span, which is the RLS's way of defining spans (more type-safe than the compiler's built-in way). This is basically just to convert from compiler spans to RLS spans. I also pull in the crates.io version of rustc-serialize, which is a bit annoying, but seems to be the only way to have serialisable data in an external crate. To make this work, all of the save-analysis crate has to use this version too (cc #40527). Finally I pull in a line from #40347 to make the unstable crate checking stuff working. There are a lot of changes to save-analysis but they are all mechanical and trivial - changing from using `From` to `Into` (because of orphan rules) being the main thing. r? @alexcrichton
2017-03-17Fix handlebars failure by using the `rustbuild` feature less indiscriminately.Nick Cameron-1/+7
2017-03-15Handle feature=rustbuildNick Cameron-0/+1
Taken from https://github.com/rust-lang/rust/pull/40347/files And update rls-span to a version with the rustbuild boilerplate
2017-03-12Update usages of 'OSX' (and other old names) to 'macOS'.Corey Farwell-1/+1
As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
2017-02-25Rollup merge of #39888 - nagisa:on-fail-bootstrap, r=alexcrichtonEduard-Mihai Burtescu-3/+15
[rustbuild] add a way to run command after failure This is a simple way to workaround the debugging issues caused by the rustc wrapper used in the bootstrap process. Namely, it uses some obscure environment variables and you can't just copy the failed command and run it in the shell or debugger to examine the failure more closely. With `--on-fail` its possible to run an arbitrary command within exactly the same environment under which rustc failed. Theres's multiple ways to use this new flag: $ python x.py build --stage=1 --on-fail=env would print a list of environment variables and the failed command, so a few copy-pastes and you now can run the same rust in your shell outside the bootstrap system. $ python x.py build --stage=1 --on-fail=bash Is a more useful variation of the command above in that it launches a whole shell with environment already in place! All that's left to do is copy-paste the command just above the shell prompt! Fixes #38686 Fixes #38221
2017-02-16[rustbuild] add a way to run command after failureSimonas Kazlauskas-3/+15
This is a simple way to workaround the debugging issues caused by the rustc wrapper used in the bootstrap process. Namely, it uses some obscure environment variables and you can’t just copy the failed command and run it in the shell or debugger to examine the failure more closely. With `--on-fail` its possible to run an arbitrary command within exactly the same environment under which rustc failed. Theres’s multiple ways to use this new flag: $ python x.py build --stage=1 --on-fail=env would print a list of environment variables and the failed command, so a few copy-pastes and you now can run the same rust in your shell outside the bootstrap system. $ python x.py build --stage=1 --on-fail=bash Is a more useful variation of the command above in that it launches a whole shell with environment already in place! All that’s left to do is copy-paste the command just above the shell prompt! Fixes #38686 Fixes #38221
2017-02-15rustc: Link statically to the MSVCRTAlex Crichton-0/+5
This commit changes all MSVC rustc binaries to be compiled with `-C target-feature=+crt-static` to link statically against the MSVCRT instead of dynamically (as it does today). This also necessitates compiling LLVM in a different fashion, ensuring it's compiled with `/MT` instead of `/MD`. cc #37406
2017-02-04README path correctionking6cong-2/+2
2016-12-30rustbuild: Compile all support tools in stage0Alex Crichton-1/+3
This commit changes all tools and such to get compiled in stage0, not in later stages. The purpose of this commit is to cut down dependencies on later stages for future modifications to the build system. Notably we're going to be adding builders that produce a full suite of cross-compiled artifacts for a particular host, and that shouldn't compile the `x86_64-unknown-linux-gnu` compiler more than once. Currently dependencies on, for example, the error index end up compiling the `x86_64-unknown-linux-gnu` compiler more than necessary. As a result here we move many dependencies on these tools to being produced by a stage0 compiler, not a stage1+ compiler. None of these tools actually need to be staged at all, so they'll exhibit consistent behavior across the stages.
2016-12-24Teach `rustdoc --test` about `--sysroot`, pass it when testing rustAidan Hobson Sayers-1/+5
This permits rustdoc tests to work in stage0
2016-12-20rustbuild: Deny and fix warningsAlex Crichton-0/+4
Turned out this lint uncovered an actual bug! Closes #38484
2016-12-19Auto merge of #38072 - nikomatsakis:bootstrap-incremental, r=acrichtobors-0/+27
add preliminary support for incremental compilation to rustbuild.py This implements the integration described in #37929. It requires the use of a local nightly as your bootstrap compiler. The setup is described in `src/bootstrap/README.md`. This does NOT implement the "copy stage0 libs to stage1" optimization described in #37929, just because that seems orthogonal to me. In local testing, I do not yet see any incremental re-use when building rustc. I'm not sure why that is, more investigation needed. (For these reasons, this is not marked as fixing the relevant issue.) r? @alexcrichton -- I included one random cleanup (`Step::noop()`) that turned out to not be especially relevant. Feel free to tell me you liked it better the old way.
2016-12-19add and document `--incremental` flag along with misc other changesNiko Matsakis-0/+27
For example: - we now support `-vv` to get very verbose output. - RUSTFLAGS is respected by `x.py` - better error messages for some cases
2016-12-18Use exec for the wrapper on UNIXesSimonas Kazlauskas-3/+14
This not only avoids the small – and unnecessary – constant overhead for each compiler invocation, but also helps somewhat by only having “correct” rustc processes to look for in `/proc/`. This also makes the wrapper behave effectively as a regular exec wrapper its intended to be.
2016-12-17rustbuild: Fix LC_ID_DYLIB directives on OSXAlex Crichton-0/+9
Currently libraries installed by rustbuild on OSX have an incorrect `LC_ID_DYLIB` directive located in the dynamic libraries that are installed. The directive we expect looks like: @rpath/libstd.dylib Which means that if you want to find that dynamic library you should look at the dylib's other `@rpath` directives. Typically our `@rpath` directives look like `@loader_path/../lib` for the compiler as that's where the installed libraries will be located. Currently, though, rustbuild produces dylibs with the directive that looks like: /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libstd-713ad88203512705.dylib In other words, the build directory is encoded erroneously. The compiler already [knows how] to change this directive, but it only passes that argument when `-C rpath` is also passed. The rustbuild system, however, explicitly [does not pass] this option explicitly and instead bakes its own. This logic then also erroneously didn't pass `-Wl,-install_name` like the compiler. [knows how]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/librustc_trans/back/linker.rs#L210-L214 [does not pass]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/bootstrap/bin/rustc.rs#L133-L158 To fix this regression this patch introduces a new `-Z` flag, `-Z osx-rpath-install-name` which basically just forces the compiler to take the previous `-install_name` branch when creating a dynamic library. Hopefully we can sort out a better rpath story in the future, but for now this "hack" should suffice in getting our nightly builds back to the same state as before. Closes #38430
2016-12-09Create tar balls of save-analysis-api metadata for the standard libraries as ↵Nick Cameron-0/+5
part of `make dist`.
2016-10-22Rollup merge of #37209 - srinivasreddy:bootstrap_bin, r=nrcGuillaume Gomez-13/+16
run rustfmt on bootstrap/bin folder
2016-10-19Enable line number debuginfo in releasesAlex Crichton-0/+2
This commit enables by default passing the `-C debuginfo=1` argument to the compiler for the stable, beta, and nightly release channels. A new configure option was also added, `--enable-debuginfo-lines`, to enable this behavior in developer builds as well. Closes #36452
2016-10-16run rustfmt on bootstrap/bin folderSrinivas Reddy Thatiparthy-13/+16
2016-09-28Remove stage0 hacksBrian Anderson-2/+1
2016-09-25Report which required build-time environment variable is not setJake Goulding-8/+8
2016-08-18Add workaround to detect correct compiler versionJonathan Turner-1/+7
2016-07-05rustbuild: Remove the `build` directoryAlex Crichton-0/+242
The organization in rustbuild was a little odd at the moment where the `lib.rs` was quite small but the binary `main.rs` was much larger. Unfortunately as well there was a `build/` directory with the implementation of the build system, but this directory was ignored by GitHub on the file-search prompt which was a little annoying. This commit reorganizes rustbuild slightly where all the library files (the build system) is located directly inside of `src/bootstrap` and all the binaries now live in `src/bootstrap/bin` (they're small). Hopefully this should allow GitHub to index and allow navigating all the files while maintaining a relatively similar layout to the other libraries in `src/`.