diff options
| author | James Dietz <jamesthespeedy@gmail.com> | 2023-04-26 21:11:14 -0400 |
|---|---|---|
| committer | James Dietz <jamesthespeedy@gmail.com> | 2023-05-04 20:29:38 -0400 |
| commit | ea17aa9141cde9f26ec09b423ca2efe8aa08cc33 (patch) | |
| tree | fe23ced53325da8542c689b238c254822508df22 /compiler/rustc_codegen_llvm/src | |
| parent | eb7a7434215dd9d4b7cc18746ad1d0e531c25325 (diff) | |
| download | rust-ea17aa9141cde9f26ec09b423ca2efe8aa08cc33.tar.gz rust-ea17aa9141cde9f26ec09b423ca2efe8aa08cc33.zip | |
`--print target-cpus` shows default target cpu, updated docs
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 46692fd5e8b..71fe8d36132 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -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), } |
