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

error: unknown codegen option: `passes\` #59142

steveklabnik opened this Issue Mar 12, 2019 · 2 comments


None yet
2 participants
Copy link

commented Mar 12, 2019

I've got a weird bug:

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

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -C passes\=lint --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-typ
e staticlib --crate-type proc-macro` (exit code: 1)
--- stderr
error: unknown codegen option: `passes\`

If you see there, it's doing -C passes\=lint.

Fails on both

> rustc --version
rustc 1.33.0 (2aa4c46cf 2019-02-28)
> rustc --version
rustc 1.35.0-nightly (e68bf8ae1 2019-03-11)

I have no idea where that \ is coming from. Any ideas?


This comment has been minimized.

Copy link

commented Mar 12, 2019

Everything between --print=file-names and --crate-type comes from user-configured rustflags (RUSTFLAGS from env, or target.*.rustflags or build.rustflags from .cargo/config).


This comment has been minimized.

Copy link
Member Author

commented Mar 12, 2019

uuuuugh thank you. (Somehow an experimental RUSTFLAGS i was working on persisted across shell invocations, thank you!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.