Add primary marker on codegen unit to take charge of main_wrapper for non-local cases.
This commit is contained in:
parent
49920bc581
commit
89a67051a7
5 changed files with 20 additions and 31 deletions
|
@ -350,12 +350,14 @@ fn collect_and_partition_mono_items<'tcx>(
|
|||
let (codegen_units, _) = tcx.sess.time("partition_and_assert_distinct_symbols", || {
|
||||
sync::join(
|
||||
|| {
|
||||
&*tcx.arena.alloc_from_iter(partition(
|
||||
let mut codegen_units = partition(
|
||||
tcx,
|
||||
&mut items.iter().cloned(),
|
||||
tcx.sess.codegen_units(),
|
||||
&inlining_map,
|
||||
))
|
||||
);
|
||||
codegen_units[0].make_primary();
|
||||
&*tcx.arena.alloc_from_iter(codegen_units)
|
||||
},
|
||||
|| assert_symbols_are_distinct(tcx, items.iter()),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue