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

rustc opt parsing: -C "llvm-args=-mcpu=arm1176jzf-s" doesn't get whole input #14228

Closed
pnkfelix opened this issue May 15, 2014 · 5 comments
Closed
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

Comments

@pnkfelix
Copy link
Member

This was reported by a user on IRC.

https://gist.github.com/thebreadcat/b47c0f49d736a990b556

Shell

$ rustc --target=arm-unknown-linux-gnueabihf main.rs -C linker=arm-linux-gnueabihf-g++ -C "llvm-args=-mcpu=arm1176jzf-s"
rustc: Unknown command line argument '-mcpu=arm1176jzf-s'. Try: 'rustc -help'
rustc: Did you mean '-debug=arm1176jzf-s'?

I am logging it here in the hopes that I remember to look at it again later when I look into hacking a little on getopts (for #14223)

@alexcrichton
Copy link
Member

This is not a bug in rustc opt parsing, but rather this message is being printed from LLVM. From what I can tell, rustc is correctly passing through the -mcpu=arm1176jzf-s to LLVM, and then LLVM isn't recognizing it.

Perhaps we could be clearer with an error?

@steveklabnik steveklabnik added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Jan 23, 2015
@frewsxcv
Copy link
Member

Can anyone confirm if this is still an issue? There have been at least a few LLVM upgrades since this was last updated

@bluss
Copy link
Member

bluss commented Mar 18, 2016

It seems to be an issue still.

Only certain kinds of arguments are accepted by llvm-args, different kinds of pass options are accepted. I don't think it's intentional..

@JinShil
Copy link

JinShil commented Nov 4, 2016

I believe this is the same issue as #26338. The arguments recognized by llc and the arguments recognized by llvm::cl::ParseCommandLineOptions() API are different. The Rust compiler uses LLVM API, so it doesn't recognize this option even though it may be valid for llc.

@Mark-Simulacrum
Copy link
Member

I'm going to close in favor of #26338, since I agree that issue is the real cause of this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
Projects
None yet
Development

No branches or pull requests

7 participants