add Builder#standard_threaded_build, #standard_finalize
parallelize Program builder command
This commit is contained in:
1 parent
1af3c5c9a4
commit
f815952ab3
3 files changed
+66
-11
No files matched your search
@@ -96,15 +96,7 @@ module Rscons
|
||||
v.nil? and raise "Error: unknown input file type: #{sources.first.inspect}"
|
||||
end.first
|
||||
command = env.build_command("${#{com_prefix}CMD}", vars)
|
||||
if cache.up_to_date?(target, command, sources, env)
|
||||
target
|
||||
else
|
||||
cache.mkdir_p(File.dirname(target))
|
||||
FileUtils.rm_f(target)
|
||||
ThreadedCommand.new(
|
||||
command,
|
||||
short_description: "#{com_prefix} #{target}")
|
||||
end
|
||||
standard_threaded_build("#{com_prefix} #{target}", target, command, sources, env, cache)
|
||||
end
|
||||
|
||||
# Finalize the build operation.
|
||||
|
||||
@@ -83,8 +83,20 @@ module Rscons
|
||||
'_SOURCES' => objects,
|
||||
'LD' => ld,
|
||||
})
|
||||
options[:sources] = objects
|
||||
command = env.build_command("${LDCMD}", vars)
|
||||
standard_build("LD #{target}", target, command, objects, env, cache)
|
||||
standard_threaded_build("LD #{target}", target, command, objects, env, cache)
|
||||
end
|
||||
|
||||
# Finalize a build.
|
||||
#
|
||||
# @param options [Hash]
|
||||
# Finalize options.
|
||||
#
|
||||
# @return [String, nil]
|
||||
# The target name on success or nil on failure.
|
||||
def finalize(options)
|
||||
standard_finalize(options)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user