summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-03-09 11:37:18 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-17 19:05:50 -0400
commit84927818ee68c6826327abc26d4647fb56053fb7 (patch)
tree108ab49003f77c80a1b2eeb755df44ecad416f22 /distrib
parent540fa6b2cff3802877ff56a47ab3611e33a9ac86 (diff)
downloadhaskell-84927818ee68c6826327abc26d4647fb56053fb7.tar.gz
llvmGen: Accept range of LLVM versions
Previously we would support only one LLVM major version. Here we generalize this to accept a range, taking this range to be LLVM 10 to 11, as 11 is necessary for Apple M1 support. We also accept 12, as that is what apple ships with BigSur on the M1.
Diffstat (limited to 'distrib')
-rw-r--r--distrib/configure.ac.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in
index 4de89941df..c287c3368d 100644
--- a/distrib/configure.ac.in
+++ b/distrib/configure.ac.in
@@ -118,19 +118,20 @@ AC_SUBST([StripCmd])
# tools we are looking for. In the past, GHC supported a number of
# versions of LLVM simultaneously, but that stopped working around
# 3.5/3.6 release of LLVM.
-LlvmVersion=@LlvmVersion@
+LlvmMinVersion=@LlvmMinVersion@
+LlvmMaxVersion=@LlvmMaxVersion@
dnl ** Which LLVM llc to use?
dnl --------------------------------------------------------------
AC_ARG_VAR(LLC,[Use as the path to LLVM's llc [default=autodetect]])
-FIND_LLVM_PROG([LLC], [llc], [$LlvmVersion])
+FIND_LLVM_PROG([LLC], [llc], [$LlvmMinVersion], [$LlvmMaxVersion])
LlcCmd="$LLC"
AC_SUBST([LlcCmd])
dnl ** Which LLVM opt to use?
dnl --------------------------------------------------------------
AC_ARG_VAR(OPT,[Use as the path to LLVM's opt [default=autodetect]])
-FIND_LLVM_PROG([OPT], [opt], [$LlvmVersion])
+FIND_LLVM_PROG([OPT], [opt], [$LlvmMinVersion], [$LlvmMaxVersion])
OptCmd="$OPT"
AC_SUBST([OptCmd])