diff options
| author | Misty De Meo | 2013-10-06 17:00:30 -0700 |
|---|---|---|
| committer | Misty De Meo | 2013-10-06 19:26:06 -0700 |
| commit | 8427e7136878241f96b04a67ee73f9e548d731da (patch) | |
| tree | 6ade19ab60134bb8fc2e95e049f86235cffc9cf2 /Library | |
| parent | 87b013719834ca5ae9241dd5fab5333e1f458aa6 (diff) | |
| download | brew-8427e7136878241f96b04a67ee73f9e548d731da.tar.bz2 | |
Track the OS's default C++ stdlib
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Homebrew/build.rb | 7 | ||||
| -rw-r--r-- | Library/Homebrew/macos.rb | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 6cb903efd..d9f4fa43b 100755 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -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 diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index 19cbbe421..b3e4b6452 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -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")) |
