Skip to content

Commit

Permalink
Prefer matching llvm-config in find-llvm-config (#13087)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Feb 28, 2023
1 parent 820b7af commit 448b4d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/llvm/ext/find-llvm-config
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ if ! LLVM_CONFIG=$(command -v "$LLVM_CONFIG"); then
llvm_config_version=$(llvm-config --version 2>/dev/null)
for version in $(cat "$(dirname $0)/llvm-versions.txt"); do
LLVM_CONFIG=$(
([ "${llvm_config_version#$version}" != "$llvm_config_version" ] && command -v llvm-config) || \
command -v llvm-config-${version%.*} || \
command -v llvm-config-$version || \
command -v llvm-config${version%.*}${version#*.} || \
command -v llvm-config${version%.*} || \
command -v llvm-config$version || \
command -v llvm${version%.*}-config || \
[ "${llvm_config_version#$version}" = "$llvm_config_version" ] || command -v llvm-config)
command -v llvm${version%.*}-config)
[ "$LLVM_CONFIG" ] && break
done
fi
Expand Down

0 comments on commit 448b4d0

Please sign in to comment.