Skip to content

Commit 410d8ed

Browse files
Brentley Jonesbrentleyjones
authored andcommitted
Only read output_file_map if it's going to be written
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.
1 parent 320d0a3 commit 410d8ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/worker/work_processor.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ void WorkProcessor::ProcessWorkRequest(
7272
arg.clear();
7373
} else if (prev_arg == "-output-file-map") {
7474
output_file_map_path = arg;
75-
output_file_map.ReadFromPath(output_file_map_path);
7675
arg.clear();
7776
} else if (ArgumentEnablesWMO(arg)) {
7877
is_wmo = true;
@@ -87,6 +86,8 @@ void WorkProcessor::ProcessWorkRequest(
8786

8887
if (!output_file_map_path.empty()) {
8988
if (!is_wmo) {
89+
output_file_map.ReadFromPath(output_file_map_path);
90+
9091
// Rewrite the output file map to use the incremental storage area and
9192
// pass the compiler the path to the rewritten file.
9293
auto new_path =

0 commit comments

Comments
 (0)