Skip to content

Commit

Permalink
incr.comp.: Fix some merge fallout.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Oct 3, 2017
1 parent dbab705 commit c96d0bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc/ty/maps/plumbing.rs
Expand Up @@ -651,7 +651,7 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,

profq_msg!(tcx,
ProfileQueriesMsg::QueryBegin(
span.clone(),
span.data(),
::ty::maps::QueryMsg::$query(profq_key!(tcx, $key))
)
);
Expand Down
7 changes: 7 additions & 0 deletions src/librustc_incremental/persist/load.rs
Expand Up @@ -33,6 +33,13 @@ pub fn dep_graph_tcx_init<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
tcx.allocate_metadata_dep_nodes();
tcx.precompute_in_scope_traits_hashes();

if tcx.sess.incr_comp_session_dir_opt().is_none() {
// If we are only building with -Zquery-dep-graph but without an actual
// incr. comp. session directory, we exit here. Otherwise we'd fail
// when trying to load work products.
return
}

let work_products_path = work_products_path(tcx.sess);
if let Some(work_products_data) = load_data(tcx.sess, &work_products_path) {
// Decode the list of work_products
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_trans/base.rs
Expand Up @@ -956,8 +956,6 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
}
}

assert!(codegen_units.len() <= 1 || !tcx.sess.lto());

let ongoing_translation = write::start_async_translation(
tcx,
time_graph.clone(),
Expand Down

0 comments on commit c96d0bf

Please sign in to comment.