Repository navigation
Conversation
| writeln!(out, " Target features listing is not supported by this LLVM version.") | ||
| .unwrap(); | ||
| TargetFeaturesInfo { | ||
| rustc_features: rustc_target_features, |
There was a problem hiding this comment.
I would expect the rustc features list to be handled in a backend independent way.
| } | ||
|
|
||
| fn print(&self, _req: &PrintRequest, _out: &mut String, _sess: &Session) {} | ||
| fn target_cpus(&self, _sess: &Session) -> Vec<TargetCpuInfo> { |
There was a problem hiding this comment.
This name is confusable with the target_cpu method (the actually selected target cpu). Please remove either or both to indicate their role.
There was a problem hiding this comment.
Could you please move the extracting print_crate_info into crate_info.rs to a separate commit?
| pub kind: PrintKind, | ||
| pub out: OutFileName, | ||
| pub arg: Option<String>, | ||
| pub format: PrintOutputFormat |
There was a problem hiding this comment.
Could you make sure each commit is formatted to avoid unrelated formatting changes in other commits?
This comment has been minimized.
This comment has been minimized.
02c2bc9 to
9e4f8c3
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
☔ The latest upstream changes (presumably #166371) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
MCP: rust-lang/compiler-team#860
Tracking issue: #165816
I think the implementation is pretty straightforward:
CodegenBackendtrait now hastarget_cpusandtarget_featuresinstead ofprint. I hope that these two methods make sense for every backend not just LLVM. I movedprint_crate_infoto a sepearte file and it also now handles printing for generic stuff like code models, relocation models etc, instead of it being in LLVM backend. I know that the handling of printing might look a bit "ad-hoc" fornative-static-libsandlink-args, but I don't think there would be any other useful output format besides json and the default one, so I didn't try to abstract it.This is still missing documentation/reference update, multiple print requests (and possibly more), but just wanted to open a pr for initial review.
r? @bjorn3
cc @jieyouxu @Urgau