--print target-cpus
shows default target cpu, updated docs
This commit is contained in:
parent
eb7a743421
commit
ea17aa9141
3 changed files with 18 additions and 4 deletions
|
@ -329,7 +329,13 @@ pub(crate) fn print(req: PrintRequest, sess: &Session) {
|
|||
require_inited();
|
||||
let tm = create_informational_target_machine(sess);
|
||||
match req {
|
||||
PrintRequest::TargetCPUs => unsafe { llvm::LLVMRustPrintTargetCPUs(tm) },
|
||||
PrintRequest::TargetCPUs => {
|
||||
println!(
|
||||
"Default CPU for this target:\n {}",
|
||||
handle_native(sess.target.cpu.as_ref())
|
||||
);
|
||||
unsafe { llvm::LLVMRustPrintTargetCPUs(tm, handle_native(sess.target.cpu.as_ref())) };
|
||||
}
|
||||
PrintRequest::TargetFeatures => print_target_features(sess, tm),
|
||||
_ => bug!("rustc_codegen_llvm can't handle print request: {:?}", req),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue