rust/src/bootstrap/bin
Eduard-Mihai Burtescu e31d46402d Rollup merge of #39888 - nagisa:on-fail-bootstrap, r=alexcrichton
[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-25 14:13:17 +02:00
..
main.rs README path correction 2017-02-04 16:44:23 +08:00
rustc.rs Rollup merge of #39888 - nagisa:on-fail-bootstrap, r=alexcrichton 2017-02-25 14:13:17 +02:00
rustdoc.rs Teach rustdoc --test about --sysroot, pass it when testing rust 2016-12-24 17:15:07 +00:00