Split ternary for PATH building into if/else cases
This commit is contained in:
parent
bfa474857a
commit
7b94842610
@ -173,13 +173,31 @@ module Superenv
|
|||||||
end
|
end
|
||||||
|
|
||||||
def determine_library_paths
|
def determine_library_paths
|
||||||
PATH.new(
|
if compiler == :llvm_clang
|
||||||
keg_only_deps.map(&:opt_lib),
|
if MacOS::CLT.installed?
|
||||||
HOMEBREW_PREFIX/"lib",
|
PATH.new(
|
||||||
"#{MacOS.sdk_path}/usr/lib",
|
keg_only_deps.map(&:opt_lib),
|
||||||
(compiler == :llvm_clang ? Formula["llvm"].opt_lib.to_s : ""),
|
HOMEBREW_PREFIX/"lib",
|
||||||
homebrew_extra_library_paths,
|
"/usr/lib",
|
||||||
).existing
|
Formula["llvm"].opt_lib.to_s,
|
||||||
|
homebrew_extra_library_paths,
|
||||||
|
).existing
|
||||||
|
else
|
||||||
|
PATH.new(
|
||||||
|
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
|
||||||
|
else
|
||||||
|
PATH.new(
|
||||||
|
keg_only_deps.map(&:opt_lib),
|
||||||
|
HOMEBREW_PREFIX/"lib",
|
||||||
|
homebrew_extra_library_paths,
|
||||||
|
).existing
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def determine_dependencies
|
def determine_dependencies
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user