-
Notifications
You must be signed in to change notification settings - Fork 63
Add accessors for MCSubtargetInfo CPU and Feature tables #45
Add accessors for MCSubtargetInfo CPU and Feature tables #45
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This would also allow a cleaner implementation of the target feature detection than that used in rust-lang/rust#31709 |
Thanks @ranma42! @alexcrichton how do you feel about carrying this patch? |
This is pretty tiny so presumably not hard to upstream. Maybe it's worth while implementing our feature to show that this is sufficient to do what we need to, then upstream (though of course the motivation to upstream will decrease once we've got the feature we need). |
Yeah this seems harmless to me, and as @ranma42 mentioned would make #31709 much cleaner! I think though that we'll still have to figure out how to work with non-bundled LLVM as we still want to be able to compile against an external LLVM. |
Thanks! I'll update rust-lang/rust#34845 to point at the official rust-llvm when I get home from work. |
Nice work @bitshifter ! |
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.
Has this been submitted upstream to LLVM? I'm asking because I'm wondering if this will make it impossible to compile against vanilla LLVM - so that we would have to add another patch to our Debian LLVM package. |
@infinity0 That was discussed in rust-lang/rust#34845, and it should be used conditionally. This was included in Rust 1.12.0, and I don't have any problem using vanilla LLVM on Fedora. |
OK great, thanks! (would still be nice if it were submitted upstream, eventually) |
The command line options for things like |
Add accessors for MCSubtargetInfo CPU and Feature tables
Add accessors for MCSubtargetInfo CPU and Feature tables
Add accessors for MCSubtargetInfo CPU and Feature tables
Add accessors for MCSubtargetInfo CPU and Feature tables
Add accessors for MCSubtargetInfo CPU and Feature tables
Add accessors for MCSubtargetInfo CPU and Feature tables
Add accessors for MCSubtargetInfo CPU and Feature tables
Add accessors for MCSubtargetInfo CPU and Feature tables
This is part of a fix for rust-lang/rust#30961. The rustc fix requires exposing some private members on MCSubtargetInfo so they can be printed from rustc.