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

cargo build failed with RUSTFLAGS="--print sysroot" #4510

Closed
mssun opened this issue Sep 19, 2017 · 4 comments
Closed

cargo build failed with RUSTFLAGS="--print sysroot" #4510

mssun opened this issue Sep 19, 2017 · 4 comments

Comments

@mssun
Copy link

mssun commented Sep 19, 2017

cargo build will fail when passing RUSTFLAGS like --print sysroot, --print native-static-libs, etc.

I guess cargo will read stdout for other purposes?

For example:

$ cargo new hello_world --bin
     Created binary (application) `hello_world` project
$ cd hello_world
$ RUSTFLAGS="--print sysroot" cargo build
error: unexpected character in cfg `/`, expected parens, a comma, an identifier, or a string

Versions:

$ cargo -V
cargo 0.23.0-nightly (8118b02ac 2017-09-14)
@alexcrichton
Copy link
Member

There's some initial stages where we parse some output from rustc that we still need to pass rustflags, how come you're passing these flags to all compliations? Shouldn't it just be the final compilation?

@mssun
Copy link
Author

mssun commented Sep 19, 2017

I intended to use a rustc flags (--print native-static-libs) to print out if my project relies on any native static libraries.

@mssun
Copy link
Author

mssun commented Sep 19, 2017

@alexcrichton I misunderstand the usage of the --print native-static-libs flag. Sorry for the trouble. Please close this issue if you think relying stdout from rustc is not an problem. Thanks.

@alexcrichton
Copy link
Member

Ok, thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants