#ughm. I set env var and now rustc is not working

10 messages · Page 1 of 1 (latest)

cobalt maple
#

So i was trying to use nightly feature with setting RUSTFLAGS="-Z threads=8" in my env variable and then getting error from compiler. I deleted the variable but compiler didnt care and still was giving me an error. I deleted rustup with rustup self uninstall and tada it doesnt work

#

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

Caused by:
process didn't exit successfully: rustc - --crate-name ___ --print=file-names "\"-Z" "threads=8\"" --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg (exit code: 1)
--- stderr
error: multiple input filenames provided (first two filenames are - and "-Z)

#

so well rustc is working but cargo gives wrong arguments I guess

#

and it fixed

#

huh

#

wtf

grave junco
#

fyi, you need the nightly compiler to use unstable flags.

cobalt maple
grave junco
#

Ah, it looks like the "s are still in your rustflags

#

"\"-Z" "threads=8\"" should be -Z threads=8, so there's that to look into