super: refactor LLVM path addition.
This commit is contained in:
parent
7b94842610
commit
7cb6ebf3fb
@ -173,31 +173,22 @@ module Superenv
|
|||||||
end
|
end
|
||||||
|
|
||||||
def determine_library_paths
|
def determine_library_paths
|
||||||
|
paths = [
|
||||||
|
keg_only_deps.map(&:opt_lib),
|
||||||
|
HOMEBREW_PREFIX/"lib",
|
||||||
|
]
|
||||||
|
|
||||||
if compiler == :llvm_clang
|
if compiler == :llvm_clang
|
||||||
if MacOS::CLT.installed?
|
if MacOS::CLT.installed?
|
||||||
PATH.new(
|
paths << "/usr/lib"
|
||||||
keg_only_deps.map(&:opt_lib),
|
|
||||||
HOMEBREW_PREFIX/"lib",
|
|
||||||
"/usr/lib",
|
|
||||||
Formula["llvm"].opt_lib.to_s,
|
|
||||||
homebrew_extra_library_paths,
|
|
||||||
).existing
|
|
||||||
else
|
else
|
||||||
PATH.new(
|
paths << "#{MacOS.sdk_path}/usr/lib"
|
||||||
keg_only_deps.map(&:opt_lib),
|
|
||||||
HOMEBREW_PREFIX/"lib",
|
|
||||||
"#{MacOS.sdk_path}/usr/lib",
|
|
||||||
Formula["llvm"].opt_lib.to_s,
|
|
||||||
homebrew_extra_library_paths,
|
|
||||||
).existing
|
|
||||||
end
|
end
|
||||||
else
|
paths << Formula["llvm"].opt_lib.to_s
|
||||||
PATH.new(
|
|
||||||
keg_only_deps.map(&:opt_lib),
|
|
||||||
HOMEBREW_PREFIX/"lib",
|
|
||||||
homebrew_extra_library_paths,
|
|
||||||
).existing
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
paths << homebrew_extra_library_paths
|
||||||
|
PATH.new(paths).existing
|
||||||
end
|
end
|
||||||
|
|
||||||
def determine_dependencies
|
def determine_dependencies
|
||||||
|
Loading…
x
Reference in New Issue
Block a user