Skip to content

rustbuild --verbose switch is missing env var info #38686

@pnkfelix

Description

@pnkfelix

When I run time python /Users/fklock/Dev/Mozilla/rust.git/x.py build --stage 1, in an error condition like error: Could not compile `core`, I see the subsequent suggestion: To learn more, run the command again with --verbose.

When I run with --verbose, I do see helpful output with the build commands it executes. In particular, I see rustc invocations that I would like to run myself, with RUST_BACKTRACE=1 turned on.

Unfortunately:

 /Users/fklock/Dev/Mozilla/rust.git/objdir-dbgopt/build/bootstrap/debug/rustc /Users/fklock/Dev/Mozilla/rust.git/src/libcore/lib.rs --crate-name core --crate-type lib -C opt-level=2 -C metadata=7824b4c14b4ca3e8 -C extra-filename=-7824b4c14b4ca3e8 --out-dir /Users/fklock/Dev/Mozilla/rust.git/objdir-dbgopt/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps --emit=dep-info,link --target x86_64-apple-darwin -L dependency=/Users/fklock/Dev/Mozilla/rust.git/objdir-dbgopt/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps
thread 'main' panicked at 'RUSTC_STAGE was not set: NotPresent', ../src/libcore/result.rs:837

i.e., the environment variable RUSTC_STAGE needs to be set. After I set that, I get:

thread 'main' panicked at 'RUSTC_SYSROOT was not set', ../src/libcore/option.rs:705

and I start to wonder: "How many of these environment variables are there? Am I going to have to deduce the values for all of them? Why doesn't the --verbose flag either include them in the command invocation output (to make it trivial to cut-and-paste the desired command), or at least include them somewhere in the output so that I can grep for them?"

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions