Add macOS libs ahead of brewed llvm libs in lib search path

This ensures that libraries that are built with brewed LLVM but not
included in the Command Line Tools/Xcode (e.g. libomp) can be found
during a build, while still using system libraries for the essential
stuff (e.g. libc++)
This commit is contained in:
Alex Wang 2018-02-26 18:29:37 -05:00
parent 650d6dbaac
commit bfa474857a

View File

@ -176,6 +176,8 @@ module Superenv
PATH.new(
keg_only_deps.map(&:opt_lib),
HOMEBREW_PREFIX/"lib",
"#{MacOS.sdk_path}/usr/lib",
(compiler == :llvm_clang ? Formula["llvm"].opt_lib.to_s : ""),
homebrew_extra_library_paths,
).existing
end