@@ -155,7 +155,8 @@ where
155
155
// local functions the definition of which is marked with `#[inline]`.
156
156
let mut post_inlining = {
157
157
let _prof_timer = tcx. prof . generic_activity ( "cgu_partitioning_place_inline_items" ) ;
158
- let is_debug_incremental = tcx. sess . opts . optimize == OptLevel :: No && tcx. sess . opts . incremental . is_some ( ) ;
158
+ let is_debug_incremental =
159
+ tcx. sess . opts . optimize == OptLevel :: No && tcx. sess . opts . incremental . is_some ( ) ;
159
160
place_inlined_mono_items ( initial_partitioning, inlining_map, is_debug_incremental)
160
161
} ;
161
162
@@ -228,14 +229,22 @@ where
228
229
InstantiationMode :: LocalCopy => continue ,
229
230
}
230
231
231
- let characteristic_def_id = characteristic_def_id_of_mono_item ( tcx, mono_item, is_debug_incremental) ;
232
+ let characteristic_def_id =
233
+ characteristic_def_id_of_mono_item ( tcx, mono_item, is_debug_incremental) ;
232
234
let is_volatile = is_incremental_build && mono_item. is_generic_fn ( ) ;
233
235
234
236
let codegen_unit_name = match ( characteristic_def_id, mono_item. is_local ( ) ) {
235
237
( Some ( def_id) , false ) if is_debug_incremental => {
236
238
let crate_name = tcx. crate_name ( def_id. krate ) ;
237
- cgu_name_builder. build_cgu_name ( LOCAL_CRATE , & [ & * crate_name. as_str ( ) , if mono_item. has_closure_generic_argument ( ) { "has_closure" } else { "" } ] , Some ( "cgu" ) )
238
- } ,
239
+ cgu_name_builder. build_cgu_name (
240
+ LOCAL_CRATE ,
241
+ & [
242
+ & * crate_name. as_str ( ) ,
243
+ if mono_item. has_closure_generic_argument ( ) { "has_closure" } else { "" } ,
244
+ ] ,
245
+ Some ( "cgu" ) ,
246
+ )
247
+ }
239
248
( Some ( def_id) , _) => compute_codegen_unit_name (
240
249
tcx,
241
250
cgu_name_builder,
@@ -468,7 +477,9 @@ fn merge_codegen_units<'tcx>(
468
477
assert ! ( target_cgu_count >= 1 ) ;
469
478
let codegen_units = & mut initial_partitioning. codegen_units ;
470
479
471
- if tcx. is_compiler_builtins ( LOCAL_CRATE ) || ( tcx. dep_graph . is_fully_enabled ( ) && tcx. sess . opts . optimize == OptLevel :: No ) {
480
+ if tcx. is_compiler_builtins ( LOCAL_CRATE )
481
+ || ( tcx. dep_graph . is_fully_enabled ( ) && tcx. sess . opts . optimize == OptLevel :: No )
482
+ {
472
483
// Compiler builtins require some degree of control over how mono items
473
484
// are partitioned into compilation units. Provide it by keeping the
474
485
// original partitioning when compiling the compiler builtins crate.
0 commit comments