From bfa474857adb749a4edc7727987bb42ce66de728 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Mon, 26 Feb 2018 18:29:37 -0500 Subject: [PATCH] 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++) --- Library/Homebrew/extend/ENV/super.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index b4f0dfcac0..ce17af5ca3 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -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