Don't use LLVM to compute -Ctarget-feature
This commit is contained in:
parent
484aca8857
commit
a25da077cf
6 changed files with 121 additions and 113 deletions
|
@ -97,13 +97,12 @@ pub fn write_output_file<'ll>(
|
|||
|
||||
pub fn create_informational_target_machine(
|
||||
sess: &Session,
|
||||
extra_features: bool,
|
||||
only_base_features: bool,
|
||||
) -> OwnedTargetMachine {
|
||||
let config = TargetMachineFactoryConfig { split_dwarf_file: None, output_obj_file: None };
|
||||
// Can't use query system here quite yet because this function is invoked before the query
|
||||
// system/tcx is set up.
|
||||
let features =
|
||||
if extra_features { llvm_util::global_llvm_features(sess, false) } else { Vec::new() };
|
||||
let features = llvm_util::global_llvm_features(sess, false, only_base_features);
|
||||
target_machine_factory(sess, config::OptLevel::No, &features)(config)
|
||||
.unwrap_or_else(|err| llvm_err(sess.dcx(), err).raise())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue