class Rscons::Builders::Disassemble
The Disassemble
builder produces a disassembly listing of a source file.
Public Instance Methods
default_variables(env)
click to toggle source
Return default construction variables for the builder.
@param env [Environment] The Environment
using the builder.
@return [Hash] Default construction variables for the builder.
# File lib/rscons/builders/disassemble.rb, line 11 def default_variables(env) { "OBJDUMP" => "objdump", "DISASM_CMD" => ["${OBJDUMP}", "${DISASM_FLAGS}", "${_SOURCES}"], "DISASM_FLAGS" => ["--disassemble", "--source"], } end
finalize(options)
click to toggle source
Finalize a build.
@param options [Hash]
Finalize options.
@return [String, nil]
The target name on success or nil on failure.
# File lib/rscons/builders/disassemble.rb, line 50 def finalize(options) standard_finalize(options) end
run(target, sources, cache, env, vars)
click to toggle source
Run the builder to produce a build target.
@param target [String] Target file name. @param sources [Array<String>] Source file name(s). @param cache [Cache] The Cache
object. @param env [Environment] The Environment
executing the builder. @param vars [Hash,VarSet] Extra construction variables.
@return [String,false]
Name of the target file on success or false on failure.
# File lib/rscons/builders/disassemble.rb, line 29 def run(target, sources, cache, env, vars) vars = vars.merge("_SOURCES" => sources) command = env.build_command("${DISASM_CMD}", vars) if cache.up_to_date?(target, command, sources, env) target else cache.mkdir_p(File.dirname(target)) ThreadedCommand.new( command, short_description: "Disassemble #{target}", system_options: {out: target}) end end