Commit 140f0a74 authored by Ben Gamari's avatar Ben Gamari 🐢

configure: Search for LLVM executables with two-number versions

Fedora uses the naming llc-7.0 while Debian uses llc-7. Ensure that both
are found.

Fixes #16990.

(cherry picked from commit 90bf11c6)
parent d9e01a96
......@@ -2132,7 +2132,8 @@ AC_DEFUN([XCODE_VERSION],[
# FIND_LLVM_PROG()
# --------------------------------
# Find where the llvm tools are. We have a special function to handle when they
# are installed with a version suffix (e.g., llc-3.1).
# are installed with a version suffix (e.g., llc-7, llc-7.0) and without (e.g.
# llc).
#
# $1 = the variable to set
# $2 = the command to look for
......@@ -2140,7 +2141,7 @@ AC_DEFUN([XCODE_VERSION],[
#
AC_DEFUN([FIND_LLVM_PROG],[
# Test for program with and without version name.
AC_CHECK_TOOLS([$1], [$2-$3 $2], [:])
AC_CHECK_TOOLS([$1], [$2-$3 $2-$3.0 $2], [:])
if test "$$1" != ":"; then
AC_MSG_CHECKING([$$1 is version $3])
if test `$$1 --version | grep -c "version $3"` -gt 0 ; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment