summaryrefslogtreecommitdiff
path: root/testsuite/mk
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-06-20 20:28:54 +0100
committerIan Lynagh <ian@well-typed.com>2013-06-20 20:28:54 +0100
commit7b78543b047b34a273f7afc928ed12feeeca17b8 (patch)
tree4bfbdefa7f8e7f0921a8885c4ab4617e6374819b /testsuite/mk
parent10081794e76b37baa7d90d9fb6edc4c48dfb54c9 (diff)
downloadhaskell-7b78543b047b34a273f7afc928ed12feeeca17b8.tar.gz
Improve the testsuite's LLVM detection
Diffstat (limited to 'testsuite/mk')
-rw-r--r--testsuite/mk/ghc-config.hs1
-rw-r--r--testsuite/mk/test.mk7
2 files changed, 7 insertions, 1 deletions
diff --git a/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs
index 2a229a7580..9a6a5e74df 100644
--- a/testsuite/mk/ghc-config.hs
+++ b/testsuite/mk/ghc-config.hs
@@ -26,6 +26,7 @@ main = do
getGhcFieldOrDefault fields "GhcDynamicByDefault" "Dynamic by default" "NO"
getGhcFieldOrDefault fields "GhcDynamic" "GHC Dynamic" "NO"
getGhcFieldProgWithDefault fields "AR" "ar command" "ar"
+ getGhcFieldProgWithDefault fields "LLC" "LLVM llc command" "llc"
let pkgdb_flag = case lookup "Project version" fields of
Just v
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index fa2edb2439..c840d4f343 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -118,7 +118,12 @@ else
RUNTEST_OPTS += -e ghc_with_smp=0
endif
-ifneq "$(shell $(SHELL) -c 'llc --version | grep version' 2> /dev/null)" ""
+ifeq "$(LLC)" ""
+RUNTEST_OPTS += -e ghc_with_llvm=0
+else ifneq "$(LLC)" "llc"
+# If we have a real detected value for LLVM, then it really ought to work
+RUNTEST_OPTS += -e ghc_with_llvm=1
+else ifneq "$(shell $(SHELL) -c 'llc --version | grep version' 2> /dev/null)" ""
RUNTEST_OPTS += -e ghc_with_llvm=1
else
RUNTEST_OPTS += -e ghc_with_llvm=0