Add help for target CPUs, features, relocation and code models.
This commit is contained in:
parent
d11936251a
commit
e1efa324ec
6 changed files with 95 additions and 4 deletions
|
|
@ -69,6 +69,7 @@ use pretty::{PpMode, UserIdentifiedItem};
|
|||
use rustc_resolve as resolve;
|
||||
use rustc_save_analysis as save;
|
||||
use rustc_trans::back::link;
|
||||
use rustc_trans::back::write::create_target_machine;
|
||||
use rustc::dep_graph::DepGraph;
|
||||
use rustc::session::{self, config, Session, build_session, CompileResult};
|
||||
use rustc::session::config::{Input, PrintRequest, OutputType, ErrorOutputType};
|
||||
|
|
@ -657,6 +658,29 @@ impl RustcDefaultCalls {
|
|||
}
|
||||
}
|
||||
}
|
||||
PrintRequest::TargetCPUs => {
|
||||
let tm = create_target_machine(sess);
|
||||
unsafe { llvm::LLVMRustPrintTargetCPUs(tm); }
|
||||
}
|
||||
PrintRequest::TargetFeatures => {
|
||||
let tm = create_target_machine(sess);
|
||||
unsafe { llvm::LLVMRustPrintTargetFeatures(tm); }
|
||||
}
|
||||
PrintRequest::RelocationModels => {
|
||||
println!("Available relocation models:\n");
|
||||
println!(" pic");
|
||||
println!(" static");
|
||||
println!(" default");
|
||||
println!(" dynamic-no-pic\n");
|
||||
}
|
||||
PrintRequest::CodeModels => {
|
||||
println!("Available code models:\n");
|
||||
println!(" default");
|
||||
println!(" small");
|
||||
println!(" kernel");
|
||||
println!(" medium");
|
||||
println!(" large\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
return Compilation::Stop;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue