minor clarification to Environment#process_step behavior

This commit is contained in:
Josh Holtrop 2019-05-09 21:36:31 -04:00
parent a4dec210ae
commit dd3d468a28

View File

@ -666,7 +666,7 @@ module Rscons
if thread if thread
# We found a completed thread. # We found a completed thread.
process_remove_wait(thread) process_remove_wait(thread)
builder = builder_for_thread(thread) unblocked_builder = builder_for_thread(thread)
completed_command = @threads[thread] completed_command = @threads[thread]
@threads.delete(thread) @threads.delete(thread)
if completed_command.is_a?(Command) if completed_command.is_a?(Command)
@ -674,7 +674,7 @@ module Rscons
completed_command.status = thread.value completed_command.status = thread.value
unless completed_command.status unless completed_command.status
Cache.instance["failed_commands"] << completed_command.command Cache.instance["failed_commands"] << completed_command.command
@process_failures << "Failed to build #{builder.target}." @process_failures << "Failed to build #{unblocked_builder.target}."
return return
end end
end end
@ -699,15 +699,13 @@ module Rscons
result << builder_for_thread(thread).target result << builder_for_thread(thread).target
end end
if @builder_sets.size > 0 if @builder_sets.size > 0
builder = @builder_sets[0].get_next_builder_to_run(targets_still_building) if builder = @builder_sets[0].get_next_builder_to_run(targets_still_building)
end builder.vars = @varset.merge(builder.vars)
@build_hooks[:pre].each do |build_hook_block|
if builder build_hook_block.call(builder)
builder.vars = @varset.merge(builder.vars) end
@build_hooks[:pre].each do |build_hook_block| return run_builder(builder)
build_hook_block.call(builder)
end end
return run_builder(builder)
end end
if @threads.size > 0 if @threads.size > 0