Skip to content
Snippets Groups Projects
Commit e40b7352 authored by Jack Nagel's avatar Jack Nagel
Browse files

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.
parent d8647082
No related branches found
No related tags found
No related merge requests found
...@@ -128,7 +128,7 @@ class Build ...@@ -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 ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment