Querify global_backend_features
At the very least this serves to deduplicate the diagnostics that are output about unknown target features provided via CLI.
This commit is contained in:
parent
c97c216efd
commit
df701a292c
10 changed files with 58 additions and 48 deletions
|
@ -1033,6 +1033,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
|
|||
} else {
|
||||
tcx.backend_optimization_level(())
|
||||
};
|
||||
let backend_features = tcx.global_backend_features(());
|
||||
let cgcx = CodegenContext::<B> {
|
||||
backend: backend.clone(),
|
||||
crate_types: sess.crate_types().to_vec(),
|
||||
|
@ -1054,7 +1055,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
|
|||
regular_module_config: regular_config,
|
||||
metadata_module_config: metadata_config,
|
||||
allocator_module_config: allocator_config,
|
||||
tm_factory: backend.target_machine_factory(tcx.sess, ol),
|
||||
tm_factory: backend.target_machine_factory(tcx.sess, ol, backend_features),
|
||||
total_cgus,
|
||||
msvc_imps_needed: msvc_imps_needed(tcx),
|
||||
is_pe_coff: tcx.sess.target.is_like_windows,
|
||||
|
|
|
@ -134,6 +134,7 @@ pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Se
|
|||
&self,
|
||||
sess: &Session,
|
||||
opt_level: config::OptLevel,
|
||||
target_features: &[String],
|
||||
) -> TargetMachineFactoryFn<Self>;
|
||||
fn target_cpu<'b>(&self, sess: &'b Session) -> &'b str;
|
||||
fn tune_cpu<'b>(&self, sess: &'b Session) -> Option<&'b str>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue