Pass the build object into the Tab

Since the Tab is written in the build process, the formula's build
object will have the correct args attached to it already, so we don't
need to reconstruct it.
This commit is contained in:
Jack Nagel 2014-07-30 20:27:46 -05:00
parent dd331245ab
commit 393e10849b
2 changed files with 4 additions and 8 deletions

View File

@ -186,8 +186,7 @@ class Build
# link against it. # link against it.
stdlibs = keg.detect_cxx_stdlibs :skip_executables => true stdlibs = keg.detect_cxx_stdlibs :skip_executables => true
Tab.create(f, ENV.compiler, stdlibs.first, Tab.create(f, ENV.compiler, stdlibs.first, f.build).write
Options.coerce(ARGV.options_only)).write
rescue Exception => e rescue Exception => e
if ARGV.debug? if ARGV.debug?
debrew e, f debrew e, f

View File

@ -10,16 +10,13 @@ require 'utils/json'
class Tab < OpenStruct class Tab < OpenStruct
FILENAME = 'INSTALL_RECEIPT.json' FILENAME = 'INSTALL_RECEIPT.json'
def self.create f, compiler, stdlib, args def self.create(formula, compiler, stdlib, build)
build = f.build.dup
build.args = args
Tab.new :used_options => build.used_options, Tab.new :used_options => build.used_options,
:unused_options => build.unused_options, :unused_options => build.unused_options,
:tabfile => f.prefix.join(FILENAME), :tabfile => formula.prefix.join(FILENAME),
:built_as_bottle => !!ARGV.build_bottle?, :built_as_bottle => !!ARGV.build_bottle?,
:poured_from_bottle => false, :poured_from_bottle => false,
:tapped_from => f.tap, :tapped_from => formula.tap,
:time => Time.now.to_i, :time => Time.now.to_i,
:HEAD => Homebrew.git_head, :HEAD => Homebrew.git_head,
:compiler => compiler, :compiler => compiler,