Skip to content

Commit

Permalink
Stdlib check should use the compiler used to build the bottle
Browse files Browse the repository at this point in the history
  • Loading branch information
jacknagel committed Jun 28, 2015
1 parent 0f74587 commit 7690a00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Library/Homebrew/formula_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -626,12 +626,13 @@ def pour
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
Expand Down
7 changes: 5 additions & 2 deletions Library/Homebrew/tab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,14 @@ def unused_options
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?
Expand Down

0 comments on commit 7690a00

Please sign in to comment.