Trait rustc_codegen_ssa::traits::ExtraBackendMethods
source · pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Send + Sync {
fn codegen_allocator<'tcx>(
&self,
tcx: TyCtxt<'tcx>,
module_name: &str,
kind: AllocatorKind,
has_alloc_error_handler: bool
) -> Self::Module;
fn compile_codegen_unit(
&self,
tcx: TyCtxt<'_>,
cgu_name: Symbol
) -> (ModuleCodegen<Self::Module>, u64);
fn target_machine_factory(
&self,
sess: &Session,
opt_level: 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>;
fn spawn_thread<F, T>(_time_trace: bool, f: F) -> JoinHandle<T>
where
F: FnOnce() -> T,
F: Send + 'static,
T: Send + 'static,
{ ... }
fn spawn_named_thread<F, T>(
_time_trace: bool,
name: String,
f: F
) -> Result<JoinHandle<T>>
where
F: FnOnce() -> T,
F: Send + 'static,
T: Send + 'static,
{ ... }
}
Required Methods
sourcefn codegen_allocator<'tcx>(
fn codegen_allocator<'tcx>(
&self,
tcx: TyCtxt<'tcx>,
module_name: &str,
kind: AllocatorKind,
has_alloc_error_handler: bool
) -> Self::Module
sourcefn compile_codegen_unit(
&self,
tcx: TyCtxt<'_>,
cgu_name: Symbol
) -> (ModuleCodegen<Self::Module>, u64)
fn compile_codegen_unit(
&self,
tcx: TyCtxt<'_>,
cgu_name: Symbol
) -> (ModuleCodegen<Self::Module>, u64)
This generates the codegen unit and returns it along with
a u64
giving an estimate of the unit’s processing cost.
sourcefn target_machine_factory(
fn target_machine_factory(
&self,
sess: &Session,
opt_level: OptLevel,
target_features: &[String]
) -> TargetMachineFactoryFn<Self>
source
fn target_cpu<'b>(&self, sess: &'b Session) -> &'b str
Provided Methods
sourcefn spawn_thread<F, T>(_time_trace: bool, f: F) -> JoinHandle<T>where
fn spawn_thread<F, T>(_time_trace: bool, f: F) -> JoinHandle<T>where
F: FnOnce() -> T,
F: Send + 'static,
T: Send + 'static,
sourcefn spawn_named_thread<F, T>(