Skip to content

Commit

Permalink
Only read output_file_map if it's going to be written
Browse files Browse the repository at this point in the history
The output_file_map is only written to disk in a transformed state if an incremental build is happening. This change causes the output_file_map to only be read and processed in that case as well, leading to less work in the WMO case.
  • Loading branch information
Brentley Jones authored and brentleyjones committed Oct 28, 2020
1 parent 51c605d commit 3b11994
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/worker/work_processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ void WorkProcessor::ProcessWorkRequest(
arg.clear();
} else if (prev_arg == "-output-file-map") {
output_file_map_path = arg;
output_file_map.ReadFromPath(output_file_map_path);
arg.clear();
} else if (ArgumentEnablesWMO(arg)) {
is_wmo = true;
Expand All @@ -87,6 +86,8 @@ void WorkProcessor::ProcessWorkRequest(

if (!output_file_map_path.empty()) {
if (!is_wmo) {
output_file_map.ReadFromPath(output_file_map_path);

// Rewrite the output file map to use the incremental storage area and
// pass the compiler the path to the rewritten file.
auto new_path =
Expand Down

0 comments on commit 3b11994

Please sign in to comment.