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.
This commit is contained in:
parent
d864708271
commit
e40b735217
@ -128,7 +128,7 @@ class Build
|
|||||||
|
|
||||||
formula.install
|
formula.install
|
||||||
|
|
||||||
stdlibs = detect_stdlibs
|
stdlibs = detect_stdlibs(ENV.compiler)
|
||||||
Tab.create(formula, ENV.compiler, stdlibs.first, formula.build).write
|
Tab.create(formula, ENV.compiler, stdlibs.first, formula.build).write
|
||||||
|
|
||||||
# Find and link metafiles
|
# Find and link metafiles
|
||||||
@ -138,9 +138,9 @@ class Build
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def detect_stdlibs
|
def detect_stdlibs(compiler)
|
||||||
keg = Keg.new(formula.prefix)
|
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
|
# The stdlib recorded in the install receipt is used during dependency
|
||||||
# compatibility checks, so we only care about the stdlib that libraries
|
# compatibility checks, so we only care about the stdlib that libraries
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user