about summary refs log tree commit diff
path: root/src/bootstrap/bin/rustc.rs
AgeCommit message (Collapse)AuthorLines
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-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
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/+2
This permits rustdoc tests to work in stage0
2016-12-20rustbuild: Deny and fix warningsAlex Crichton-0/+2
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-9/+10
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-9/+10
2016-09-28Remove stage0 hacksBrian Anderson-2/+1
2016-09-25Report which required build-time environment variable is not setJake Goulding-4/+4
2016-08-18Add workaround to detect correct compiler versionJonathan Turner-1/+7
2016-07-05rustbuild: Remove the `build` directoryAlex Crichton-0/+165
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/`.