Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rustbuild] add a way to run command after failure #39888

Merged
merged 1 commit into from
Feb 25, 2017

Commits on Feb 16, 2017

  1. [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 rust-lang#38686
    Fixes rust-lang#38221
    nagisa committed Feb 16, 2017
    Configuration menu
    Copy the full SHA
    0e45a5e View commit details
    Browse the repository at this point in the history