1
Fork 0

Provide default MetadataLoader

This commit is contained in:
bjorn3 2021-05-29 15:00:18 +02:00
parent 45c9775361
commit f04a2d308e
3 changed files with 9 additions and 10 deletions

View file

@ -63,7 +63,14 @@ pub trait CodegenBackend {
None
}
fn metadata_loader(&self) -> Box<MetadataLoaderDyn>;
/// The metadata loader used to load rlib and dylib metadata.
///
/// Alternative codegen backends may want to use different rlib or dylib formats than the
/// default native static archives and dynamic libraries.
fn metadata_loader(&self) -> Box<MetadataLoaderDyn> {
Box::new(crate::back::metadata::DefaultMetadataLoader)
}
fn provide(&self, _providers: &mut Providers) {}
fn provide_extern(&self, _providers: &mut Providers) {}
fn codegen_crate<'tcx>(