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.
This comment has been minimized.
This comment has been minimized.
02c2bc9 to
9e4f8c3
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9e4f8c3 to
6d1644e
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. |
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
6d1644e to
a976fb8
Compare
| use { | ||
| crate::do_not_use_safe_print as safe_print, crate::do_not_use_safe_print as safe_println, | ||
| }; |
There was a problem hiding this comment.
| use { | |
| crate::do_not_use_safe_print as safe_print, crate::do_not_use_safe_print as safe_println, | |
| }; | |
| use crate::{do_not_use_safe_print as safe_print, do_not_use_safe_print as safe_println}; |
| let (req, out) = split_out_file_name(&req); | ||
|
|
||
| let (kind, arg) = if let Some(mnemonic) = req.strip_prefix("backend-has-mnemonic") { | ||
| let (kind, arg, format) = if let Some(rest) = req.strip_prefix("backend-has-mnemonic") { |
There was a problem hiding this comment.
Having the part after : mean different things depending on the print kind is not that nice IMO. Maybe backend-has-mnemonic should use a different syntax like --print backend-has-mnemonic-RET or maybe we should do --print backend-supported-mnemonics that prints whether a fixed set of mnemonics is supported that matches the set compiletest needs to know? What do you think @folkertdev @fneddy
|
☔ The latest upstream changes (presumably #166567) 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