Merge pull request #3840 from aw1621107/prefer-xcode-libcxx

Add macOS libs ahead of brewed llvm libs in lib search path
This commit is contained in:
Mike McQuaid 2018-03-07 16:03:26 +00:00 committed by GitHub
commit eee6e98d90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,11 +173,22 @@ module Superenv
end
def determine_library_paths
PATH.new(
paths = [
keg_only_deps.map(&:opt_lib),
HOMEBREW_PREFIX/"lib",
homebrew_extra_library_paths,
).existing
]
if compiler == :llvm_clang
if MacOS::CLT.installed?
paths << "/usr/lib"
else
paths << "#{MacOS.sdk_path}/usr/lib"
end
paths << Formula["llvm"].opt_lib.to_s
end
paths += homebrew_extra_library_paths
PATH.new(paths).existing
end
def determine_dependencies