File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -841,14 +841,24 @@ def _execute_compile_plan(
841841 )
842842 for number , batch in enumerate (batches , 1 ):
843843 object_prereqs = dict (prerequisites )
844- object_prereqs ["compile_step" ] = struct (
845- action = SWIFT_ACTION_COMPILE_CODEGEN ,
846- output = "," .join ([
844+
845+ # If there is only one batch (for small libraries, or libraries of any
846+ # size compiled with whole-module optimization), we omit the requested
847+ # file paths to eliminate some unneeded work in the worker. It will
848+ # treat a blank value as "emit all outputs".
849+ if len (batches ) == 1 :
850+ step_detail = ""
851+ else :
852+ step_detail = "," .join ([
847853 object .path
848854 for invocation in batch
849855 for object in invocation .objects
850- ]),
856+ ])
857+ object_prereqs ["compile_step" ] = struct (
858+ action = SWIFT_ACTION_COMPILE_CODEGEN ,
859+ output = step_detail ,
851860 )
861+
852862 batch_suffix = ""
853863 if compile_plan .output_nature .emits_multiple_objects :
854864 batch_suffix = " ({} of {})" .format (number , len (batches ))
You can’t perform that action at this time.
0 commit comments