Stream: t-compiler/help

Topic: rustc-wrapper


Temirkhan Myrzamadi (Aug 06 2020 at 03:56, on Zulip):

Hello everyone. I've just built the compiler (./x.py -i --jobs 4 build) and want to compile a new cargo project:

export RUSTC_WRAPPER="/home/hirrolot/Desktop/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc"
cargo check

error: failed to run rustc to learn about target-specific information

Caused by:
process didn't exit successfully: /home/hirrolot/Desktop/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib
--crate-type proc-macro --print=sysroot --print=cfg (exit code: 1)
--- stderr
error: multiple input filenames provided (first two filenames are rustc and -)

What's wrong with it? I haven't even modified the source code of rustc yet. Linux Mint

Joshua Nelson (Aug 06 2020 at 04:09, on Zulip):

I think you want RUSTC, not RUSTC_WRAPPER

Joshua Nelson (Aug 06 2020 at 04:09, on Zulip):

RUSTC_WRAPPER passes rustc as well

Christian Poveda (Aug 06 2020 at 04:10, on Zulip):

i think you can do this by adding a custom toolchain to rustup instead, if you have it

Joshua Nelson (Aug 06 2020 at 04:10, on Zulip):

yeah I would recommend that instead

Joshua Nelson (Aug 06 2020 at 04:11, on Zulip):

rustup toolchain link stage1 build/x86_64-unknown-linux-gnu/stage1

Joshua Nelson (Aug 06 2020 at 04:11, on Zulip):

and then use it with cargo +stage1 check

Temirkhan Myrzamadi (Aug 06 2020 at 04:22, on Zulip):

RUSTC works, thank you!

Last update: Sep 28 2020 at 14:30UTC