[commit: testsuite] master: Improve the testsuite's LLVM detection (3b98fc5)

Ian Lynagh igloo at earth.li
Thu Jun 20 21:46:07 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

https://github.com/ghc/testsuite/commit/3b98fc5dbe04db1b432d4bfaf8316c8b6a5cbf43

>---------------------------------------------------------------

commit 3b98fc5dbe04db1b432d4bfaf8316c8b6a5cbf43
Author: Ian Lynagh <ian at well-typed.com>
Date:   Thu Jun 20 20:28:54 2013 +0100

    Improve the testsuite's LLVM detection

>---------------------------------------------------------------

 mk/ghc-config.hs |    1 +
 mk/test.mk       |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/mk/ghc-config.hs b/mk/ghc-config.hs
index 2a229a7..9a6a5e7 100644
--- a/mk/ghc-config.hs
+++ b/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/mk/test.mk b/mk/test.mk
index fa2edb2..c840d4f 100644
--- a/mk/test.mk
+++ b/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





More information about the ghc-commits mailing list