"enable incremental compilation (experimental)"),
incremental_info: bool = (false, parse_bool, [UNTRACKED],
"print high-level information about incremental reuse (or the lack thereof)"),
+ incremental_dump_hash: bool = (false, parse_bool, [UNTRACKED],
+ "dump hash information in textual format to stdout"),
dump_dep_graph: bool = (false, parse_bool, [UNTRACKED],
"dump the dependency graph to $RUST_DEP_GRAPH (default: /tmp/dep_graph.gv)"),
query_dep_graph: bool = (false, parse_bool, [UNTRACKED],
current_hash);
continue;
}
+
+ if tcx.sess.opts.debugging_opts.incremental_dump_hash {
+ println!("node {:?} is dirty as hash is {:?} was {:?}",
+ dep_node.map_def(|&def_id| Some(tcx.def_path(def_id))).unwrap(),
+ current_hash,
+ hash.hash);
+ }
+
debug!("initial_dirty_nodes: {:?} is dirty as hash is {:?}, was {:?}",
dep_node.map_def(|&def_id| Some(tcx.def_path(def_id))).unwrap(),
current_hash,
hash.hash);
} else {
+ if tcx.sess.opts.debugging_opts.incremental_dump_hash {
+ println!("node {:?} is dirty as it was removed",
+ hash.dep_node);
+ }
+
debug!("initial_dirty_nodes: {:?} is dirty as it was removed",
hash.dep_node);
}
}
}
+ if tcx.sess.opts.debugging_opts.incremental_dump_hash {
+ for (dep_node, hash) in &preds.hashes {
+ println!("HIR hash for {:?} is {}", dep_node, hash);
+ }
+ }
+
// Create the serialized dep-graph.
let graph = SerializedDepGraph {
edges: edges,
let hash = state.finish();
debug!("save: metadata hash for {:?} is {}", def_id, hash);
+
+ if tcx.sess.opts.debugging_opts.incremental_dump_hash {
+ println!("metadata hash for {:?} is {}", def_id, hash);
+ for dep_node in sources {
+ println!("metadata hash for {:?} depends on {:?} with hash {}",
+ def_id, dep_node, preds.hashes[dep_node]);
+ }
+ }
+
serialized_hashes.hashes.push(SerializedMetadataHash {
def_index: def_id.index,
hash: hash,