File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed
rustc_codegen_cranelift/src
rustc_codegen_ssa/src/traits Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ use rustc_codegen_ssa::traits::CodegenBackend;
28
28
use rustc_codegen_ssa:: CodegenResults ;
29
29
use rustc_errors:: ErrorReported ;
30
30
use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
31
- use rustc_middle:: middle:: cstore:: { EncodedMetadata , MetadataLoader } ;
31
+ use rustc_middle:: middle:: cstore:: EncodedMetadata ;
32
32
use rustc_session:: config:: OutputFilenames ;
33
33
use rustc_session:: Session ;
34
34
@@ -163,10 +163,6 @@ impl CodegenBackend for CraneliftCodegenBackend {
163
163
}
164
164
}
165
165
166
- fn metadata_loader ( & self ) -> Box < dyn MetadataLoader + Sync > {
167
- Box :: new ( rustc_codegen_ssa:: back:: metadata:: DefaultMetadataLoader )
168
- }
169
-
170
166
fn target_features ( & self , _sess : & Session ) -> Vec < rustc_span:: Symbol > {
171
167
vec ! [ ]
172
168
}
Original file line number Diff line number Diff line change @@ -248,10 +248,6 @@ impl CodegenBackend for LlvmCodegenBackend {
248
248
target_features ( sess)
249
249
}
250
250
251
- fn metadata_loader ( & self ) -> Box < MetadataLoaderDyn > {
252
- Box :: new ( rustc_codegen_ssa:: back:: metadata:: DefaultMetadataLoader )
253
- }
254
-
255
251
fn codegen_crate < ' tcx > (
256
252
& self ,
257
253
tcx : TyCtxt < ' tcx > ,
Original file line number Diff line number Diff line change @@ -63,7 +63,14 @@ pub trait CodegenBackend {
63
63
None
64
64
}
65
65
66
- fn metadata_loader ( & self ) -> Box < MetadataLoaderDyn > ;
66
+ /// The metadata loader used to load rlib and dylib metadata.
67
+ ///
68
+ /// Alternative codegen backends may want to use different rlib or dylib formats than the
69
+ /// default native static archives and dynamic libraries.
70
+ fn metadata_loader ( & self ) -> Box < MetadataLoaderDyn > {
71
+ Box :: new ( crate :: back:: metadata:: DefaultMetadataLoader )
72
+ }
73
+
67
74
fn provide ( & self , _providers : & mut Providers ) { }
68
75
fn provide_extern ( & self , _providers : & mut Providers ) { }
69
76
fn codegen_crate < ' tcx > (
You can’t perform that action at this time.
0 commit comments