Module: Rscons::Builders::Mixins::Program
- Included in:
- Program, SharedLibrary
- Defined in:
- lib/rscons/builders/mixins/program.rb
Overview
Mixin providing functionality for a builder that links object files together into a program.
Instance Method Summary collapse
-
#run(options) ⇒ Object
Run the builder to produce a build target.
Instance Method Details
#run(options) ⇒ Object
Run the builder to produce a build target.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rscons/builders/mixins/program.rb', line 9 def run() if @command finalize_command(sources: @objects) else ld = @env.("${#{ld_var}}", @vars) if ld == "" @objects.find do |object| if builder = @env.builder_for(object) if ld = builder.preferred_ld true end end end end if ld.nil? || ld == "" ld = default_ld end @vars["_TARGET"] = @target @vars["_SOURCES"] = @objects @vars["#{ld_var}"] = ld command = @env.build_command("${#{ld_var}CMD}", @vars) standard_command("Linking <target>#{@target}<reset>", command, sources: @objects) end end |