aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/formula_installer.rb5
-rw-r--r--Library/Homebrew/tab.rb7
2 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index feffb177f..0ab33d2b4 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -626,12 +626,13 @@ class FormulaInstaller
end
FileUtils.rm_rf formula.bottle_prefix
+ tab = Tab.for_keg(formula.prefix)
+
CxxStdlib.check_compatibility(
formula, formula.recursive_dependencies,
- Keg.new(formula.prefix), MacOS.default_compiler
+ Keg.new(formula.prefix), tab.compiler
)
- tab = Tab.for_keg(formula.prefix)
tab.tap = formula.tap
tab.poured_from_bottle = true
tab.write
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 432319bf8..37b0db2fd 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -155,11 +155,14 @@ class Tab < OpenStruct
Options.create(super)
end
+ def compiler
+ super || MacOS.default_compiler
+ end
+
def cxxstdlib
# Older tabs won't have these values, so provide sensible defaults
lib = stdlib.to_sym if stdlib
- cc = compiler || MacOS.default_compiler
- CxxStdlib.create(lib, cc.to_sym)
+ CxxStdlib.create(lib, compiler.to_sym)
end
def build_bottle?