Program: do not check env.build_sources() return value (it will raise an exception if something was wrong)

This commit is contained in:
Josh Holtrop 2013-11-05 15:41:47 -05:00
parent b1cdd3d1db
commit 71344b4782

View File

@ -17,24 +17,22 @@ module Rscons
def run(target, sources, cache, env, vars = {}) def run(target, sources, cache, env, vars = {})
# build sources to linkable objects # build sources to linkable objects
objects = env.build_sources(sources, [env['OBJSUFFIX'], env['LIBSUFFIX']].flatten, cache, vars) objects = env.build_sources(sources, [env['OBJSUFFIX'], env['LIBSUFFIX']].flatten, cache, vars)
if objects ld = if env["LD"]
ld = if env["LD"] env["LD"]
env["LD"] elsif sources.find {|s| s.has_suffix?(env["DSUFFIX"])}
elsif sources.find {|s| s.has_suffix?(env["DSUFFIX"])} env["DC"]
env["DC"] elsif sources.find {|s| s.has_suffix?(env["CXXSUFFIX"])}
elsif sources.find {|s| s.has_suffix?(env["CXXSUFFIX"])} env["CXX"]
env["CXX"] else
else env["CC"]
env["CC"] end
end vars = vars.merge({
vars = vars.merge({ '_TARGET' => target,
'_TARGET' => target, '_SOURCES' => objects,
'_SOURCES' => objects, 'LD' => ld,
'LD' => ld, })
}) command = env.build_command(env['LDCOM'], vars)
command = env.build_command(env['LDCOM'], vars) standard_build("LD #{target}", target, command, objects, env, cache)
standard_build("LD #{target}", target, command, objects, env, cache)
end
end end
end end
end end