From 7690a00d0497cb2e5fbff9cfc364d8df0fc63c65 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 27 Jun 2015 20:04:45 -0400 Subject: [PATCH] Stdlib check should use the compiler used to build the bottle --- Library/Homebrew/formula_installer.rb | 5 +++-- Library/Homebrew/tab.rb | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index feffb177fd..0ab33d2b40 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 432319bf85..37b0db2fdd 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?