[commit: ghc] master: Introduce NCG config flag and add helper (ae4f103)

git at git.haskell.org git at git.haskell.org
Mon Dec 31 03:00:26 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ae4f1033cfe131fca9416e2993bda081e1f8c152/ghc

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

commit ae4f1033cfe131fca9416e2993bda081e1f8c152
Author: Gabor Greif <ggreif at gmail.com>
Date:   Sun Dec 30 10:57:46 2018 +0100

    Introduce NCG config flag and add helper
    
    ... for testing presence of NCG
    
    This commit adds a criterion for checking whether we can expect sensible
    output from --ddump-asm.


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

ae4f1033cfe131fca9416e2993bda081e1f8c152
 testsuite/config/ghc        | 2 ++
 testsuite/driver/testlib.py | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 247ddb8..24294da 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -158,6 +158,8 @@ def get_compiler_info():
     s = re.sub('[\r\n]', '', s)
     rtsInfoDict = dict(eval(s))
 
+    config.have_ncg = compilerInfoDict.get("Have native code generator", "NO") == "YES"
+
     # external interpreter needs RTS linker support
     # If the field is not present (GHC 8.0 and earlier), assume we don't
     # have -fexternal-interpreter (though GHC 8.0 actually does)
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 5f84863..96024a9 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -440,6 +440,9 @@ def cygwin( ):
 def have_vanilla( ):
     return config.have_vanilla
 
+def have_ncg( ):
+    return config.have_ncg
+
 def have_dynamic( ):
     return config.have_dynamic
 



More information about the ghc-commits mailing list