Move -Zprint-type-sizes and -Zprint-vtable-sizes into codegen_and_build_linker
This commit is contained in:
parent
2975a21b5d
commit
8127461b0e
2 changed files with 13 additions and 16 deletions
|
@ -121,6 +121,18 @@ impl<'tcx> Queries<'tcx> {
|
|||
self.global_ctxt()?.enter(|tcx| {
|
||||
let ongoing_codegen = passes::start_codegen(&*self.compiler.codegen_backend, tcx)?;
|
||||
|
||||
// This must run after monomorphization so that all generic types
|
||||
// have been instantiated.
|
||||
if tcx.sess.opts.unstable_opts.print_type_sizes {
|
||||
tcx.sess.code_stats.print_type_sizes();
|
||||
}
|
||||
|
||||
if tcx.sess.opts.unstable_opts.print_vtable_sizes {
|
||||
let crate_name = tcx.crate_name(LOCAL_CRATE);
|
||||
|
||||
tcx.sess.code_stats.print_vtable_sizes(crate_name);
|
||||
}
|
||||
|
||||
Ok(Linker {
|
||||
dep_graph: tcx.dep_graph.clone(),
|
||||
output_filenames: tcx.output_filenames(()).clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue