-
Notifications
You must be signed in to change notification settings - Fork 13.3k
-C suggestions to use llc for details is annoying #30961
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
Comments
Add |
|
@brson Could I pick this up? I'd really like to start contributing, and this seems like a great crash course in Rust's internals. |
Notably, the man page says:
so I think the |
Not that I disagree with this (I'm not sure), but I don't think we need to stick to LLVM's interface for this. We do have a facility for printing information. This would create a second way for the compiler to print information. |
@muhang Yes, please do! It'll probably take some digging through LLVM to figure out where the information is, and then you'll likely need to C via RustWrapper.cpp. |
Cool, sounds good! I'll reach out to the community via IRC if I run into any serious roadblocks. |
There's still disagreement here about the interface. We have two proposals:
The former is like In either case we can still make progress on coding up the feature. The interface is a small detail. If anybody picks this up I'd say start assuming we'll do the former, llc-like interface. |
I have a fix for this but it requires a modification to LLVM, which complicates things PR wise since the LLVM change would need to be accepted before the Rust change as I'm pointing Rust at my LLVM branch. What would be the best way of doing this? Just create a PR for both? The reason I had to modify LLVM is the information used to print the target CPU and feature help are private members on This is my first Rust change, please let me know the best way to proceed. FYI my changes so far are bitshifter/llvm@31d7a40 and bitshifter@e1efa32. |
@bitshifter Oh, awesome! Yes, you got it right. First submit the LLVM patch to our fork. It looks like the branch you want to submit to is This sounds like the kind of LLVM change that might get pushback to upstream to mainline LLVM, so I'd be prepared for that, but start with the PRs to Rust for the review. cc @alexcrichton @bitshifter has a fix for this issue that requires an LLVM patch. fyi. |
@brson thanks! I've created a couple of PRs per your suggestion. Regarding mainline LLVM, I could create a bug for llc printing duplicate information. I couldn't see anything similar in their bug tracker, potentially a similar fix could be applied upstream (expose details and print explicitly rather than implicitly). |
Add help for target CPUs, features, relocation and code models. Fix for #30961. Requires PR rust-lang/llvm#45 to be accepted first, and the .gitmodules for llvm to be updated before this can be merged.
Fixed! Thanks @bitshifter. |
rustc -C help
saysEverytime I need to find the right strings to pass these flags I groan - I have to go find some copy of llc - Rust doesn't provide it - and hope it corresponds reasonably to my rustc. This is somewhere between annoying and useless to end users. rustc should have a way itself to emit this information.
Probably should have
--print target-cpus
etc arguments.The text was updated successfully, but these errors were encountered: