Repository navigation
Conversation
bjorn3
reviewed
Nov 12, 2026
| writeln!(out, " Target features listing is not supported by this LLVM version.") | ||
| .unwrap(); | ||
| TargetFeaturesInfo { | ||
| rustc_features: rustc_target_features, |
Member
There was a problem hiding this comment.
I would expect the rustc features list to be handled in a backend independent way.
bjorn3
reviewed
Nov 12, 2026
| } | ||
|
|
||
| fn print(&self, _req: &PrintRequest, _out: &mut String, _sess: &Session) {} | ||
| fn target_cpus(&self, _sess: &Session) -> Vec<TargetCpuInfo> { |
Member
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.
bjorn3
reviewed
Nov 12, 2026
Member
There was a problem hiding this comment.
Could you please move the extracting print_crate_info into crate_info.rs to a separate commit?
bjorn3
reviewed
Nov 12, 2026
| pub kind: PrintKind, | ||
| pub out: OutFileName, | ||
| pub arg: Option<String>, | ||
| pub format: PrintOutputFormat |
Member
There was a problem hiding this comment.
Could you make sure each commit is formatted to avoid unrelated formatting changes in other commits?
Contributor
|
☔ The latest upstream changes (presumably #165918) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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