aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build.rb
diff options
context:
space:
mode:
authorJack Nagel2014-06-26 16:35:11 -0500
committerJack Nagel2014-06-26 17:21:10 -0500
commit001b2ee47132f3cab173a750031cada53f443f5b (patch)
treeafafd8421406b567756ec014ee939bbbef328dfd /Library/Homebrew/build.rb
parent3e35aacbbb4f0bc9d8408aa401d5be530aa218a4 (diff)
downloadbrew-001b2ee47132f3cab173a750031cada53f443f5b.tar.bz2
Reuse existing keg object
Diffstat (limited to 'Library/Homebrew/build.rb')
-rw-r--r--Library/Homebrew/build.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 03a0189d9..3ec01a985 100644
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -171,10 +171,11 @@ class Build
begin
f.install
+ keg = Keg.new(f.prefix)
# This first test includes executables because we still
# want to record the stdlib for something that installs no
# dylibs.
- stdlibs = Keg.new(f.prefix).detect_cxx_stdlibs
+ stdlibs = keg.detect_cxx_stdlibs
# This currently only tracks a single C++ stdlib per dep,
# though it's possible for different libs/executables in
# a given formula to link to different ones.
@@ -190,7 +191,7 @@ class Build
# of software installs an executable that links against libstdc++
# and dylibs against libc++, libc++-only dependencies can safely
# link against it.
- stdlibs = Keg.new(f.prefix).detect_cxx_stdlibs :skip_executables => true
+ stdlibs = keg.detect_cxx_stdlibs :skip_executables => true
Tab.create(f, ENV.compiler, stdlibs.first,
Options.coerce(ARGV.options_only)).write