Track the OS's default C++ stdlib
This commit is contained in:
parent
87b0137198
commit
8427e71368
@ -141,12 +141,15 @@ class Build
|
||||
end
|
||||
end
|
||||
|
||||
# We only support libstdc++ right now
|
||||
stdlib_in_use = CxxStdlib.new(:libstdcxx, ENV.compiler)
|
||||
# TODO Track user-selected stdlibs, such as boost in C++11 mode
|
||||
stdlib = ENV.compiler == :clang ? MacOS.default_cxx_stdib : :libstdcxx
|
||||
stdlib_in_use = CxxStdlib.new(stdlib, ENV.compiler)
|
||||
|
||||
# This is a bad place for this check, but we don't have access to
|
||||
# compiler selection within the formula installer, only inside the
|
||||
# build instance.
|
||||
# This is also awkward because we don't actually know yet if this package
|
||||
# will link against a C++ stdlib, but we don't want to test after the build.
|
||||
stdlib_in_use.check_dependencies(f, deps)
|
||||
|
||||
f.brew do
|
||||
|
||||
@ -110,6 +110,10 @@ module MacOS extend self
|
||||
end
|
||||
end
|
||||
|
||||
def default_cxx_stdlib
|
||||
version >= :mavericks ? :libcxx : :libstdcxx
|
||||
end
|
||||
|
||||
def gcc_40_build_version
|
||||
@gcc_40_build_version ||=
|
||||
if (path = locate("gcc-4.0"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user