@@ -94,13 +94,14 @@ pub enum Linkage {
94
94
95
95
pub fn calculate < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ) {
96
96
let sess = & tcx. sess ;
97
- let mut fmts = sess . dependency_formats . borrow_mut ( ) ;
97
+ let mut fmts = FxHashMap ( ) ;
98
98
for & ty in sess. crate_types . borrow ( ) . iter ( ) {
99
99
let linkage = calculate_type ( tcx, ty) ;
100
100
verify_ok ( tcx, & linkage) ;
101
101
fmts. insert ( ty, linkage) ;
102
102
}
103
103
sess. abort_if_errors ( ) ;
104
+ sess. dependency_formats . set ( fmts) ;
104
105
}
105
106
106
107
fn calculate_type < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
@@ -222,7 +223,7 @@ fn calculate_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
222
223
//
223
224
// Things like allocators and panic runtimes may not have been activated
224
225
// quite yet, so do so here.
225
- activate_injected_dep ( sess. injected_panic_runtime . get ( ) , & mut ret,
226
+ activate_injected_dep ( * sess. injected_panic_runtime . get ( ) , & mut ret,
226
227
& |cnum| tcx. is_panic_runtime ( cnum) ) ;
227
228
activate_injected_allocator ( sess, & mut ret) ;
228
229
@@ -301,7 +302,7 @@ fn attempt_static<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Option<DependencyLis
301
302
// Our allocator/panic runtime may not have been linked above if it wasn't
302
303
// explicitly linked, which is the case for any injected dependency. Handle
303
304
// that here and activate them.
304
- activate_injected_dep ( sess. injected_panic_runtime . get ( ) , & mut ret,
305
+ activate_injected_dep ( * sess. injected_panic_runtime . get ( ) , & mut ret,
305
306
& |cnum| tcx. is_panic_runtime ( cnum) ) ;
306
307
activate_injected_allocator ( sess, & mut ret) ;
307
308
0 commit comments