[commit: testsuite] master: Fix the testsuite config to allow running with GHC 7.6 (3d56846)

Ian Lynagh igloo at earth.li
Sun Apr 21 15:27:29 CEST 2013


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

On branch  : master

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

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

commit 3d5684657a9d1ded13883e57ab27711ced8bfd85
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sat Apr 20 22:18:42 2013 +0100

    Fix the testsuite config to allow running with GHC 7.6

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

 config/ghc |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/config/ghc b/config/ghc
index 33017bf..947f558 100644
--- a/config/ghc
+++ b/config/ghc
@@ -202,16 +202,25 @@ def get_compiler_info():
     except:
         config.package_conf_cache_file = ''
 
-    if compilerInfoDict["GHC Dynamic"] == "YES":
+    try:
+        if compilerInfoDict["GHC Dynamic"] == "YES":
+            ghcDynamic = True
+        elif compilerInfoDict["GHC Dynamic"] == "NO":
+            ghcDynamic = False
+        else:
+            raise 'Bad value for "GHC Dynamic"'
+    except KeyError:
+        # GHC < 7.7 doesn't have a "GHC Dynamic" field
+        ghcDynamic = False
+
+    if ghcDynamic:
         config.ghc_th_way_flags = "-dynamic"
         config.ghci_way_flags   = "-dynamic"
         config.ghc_th_way       = "dyn"
         config.ghc_plugin_way   = "dyn"
-    elif compilerInfoDict["GHC Dynamic"] == "NO":
+    else:
         config.ghc_th_way_flags = "-static"
         config.ghci_way_flags   = "-static"
         config.ghc_th_way       = "normal"
         config.ghc_plugin_way   = "normal"
-    else:
-        raise 'Bad value for "GHC Dynamic"'
 





More information about the ghc-commits mailing list