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