Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Mar 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Library/Homebrew/extend/ENV/super.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,22 @@ def homebrew_extra_library_paths
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
Expand Down