aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build.rb
diff options
context:
space:
mode:
authorJack Nagel2015-06-25 23:42:54 -0400
committerJack Nagel2015-06-25 23:42:54 -0400
commite40b73521709189c7d95169ff88939179d45d665 (patch)
tree3f14d9d428ecb3ab1268b9501776421bcfb49529 /Library/Homebrew/build.rb
parentd864708271c960b20eba72ebcd554a5d7e17de61 (diff)
downloadbrew-e40b73521709189c7d95169ff88939179d45d665.tar.bz2
Decouple detect_stdlibs from ENV
I want to decouple from the global ENV constant as much as possible so that eventually we can change the build environment implementation. detect_stdlibs only cares about the compiler, not the whole ENV.
Diffstat (limited to 'Library/Homebrew/build.rb')
-rw-r--r--Library/Homebrew/build.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 508e46f46..42c3e16f4 100644
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -128,7 +128,7 @@ class Build
formula.install
- stdlibs = detect_stdlibs
+ stdlibs = detect_stdlibs(ENV.compiler)
Tab.create(formula, ENV.compiler, stdlibs.first, formula.build).write
# Find and link metafiles
@@ -138,9 +138,9 @@ class Build
end
end
- def detect_stdlibs
+ def detect_stdlibs(compiler)
keg = Keg.new(formula.prefix)
- CxxStdlib.check_compatibility(formula, deps, keg, ENV.compiler)
+ CxxStdlib.check_compatibility(formula, deps, keg, compiler)
# The stdlib recorded in the install receipt is used during dependency
# compatibility checks, so we only care about the stdlib that libraries