summaryrefslogtreecommitdiff
path: root/testsuite/config
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2022-02-10 08:24:24 +0000
committerSylvain Henry <sylvain@haskus.fr>2022-11-29 09:44:31 +0100
commitcc25d52e0f65d54c052908c7d91d5946342ab88a (patch)
tree0f35764ee3b9b0451ac999b64d2db9fa074fa3dd /testsuite/config
parentdef47dd32491311289bff26230b664c895f178cc (diff)
downloadhaskell-cc25d52e0f65d54c052908c7d91d5946342ab88a.tar.gz
Add Javascript backend
Add JS backend adapted from the GHCJS project by Luite Stegeman. Some features haven't been ported or implemented yet. Tests for these features have been disabled with an associated gitlab ticket. Bump array submodule Work funded by IOG. Co-authored-by: Jeffrey Young <jeffrey.young@iohk.io> Co-authored-by: Luite Stegeman <stegeman@gmail.com> Co-authored-by: Josh Meredith <joshmeredith2008@gmail.com>
Diffstat (limited to 'testsuite/config')
-rw-r--r--testsuite/config/ghc29
1 files changed, 17 insertions, 12 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 9e6fa8db0a..8916ffa3a9 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -8,16 +8,17 @@ import re
#
config.compiler_always_flags = ghc_compiler_always_flags.split()
-# By default, the 'normal' and 'hpc' ways are enabled. In addition, certain
+# By default, the 'normal' way is enabled. In addition, certain
# ways are enabled automatically if this GHC supports them. Ways that fall in
-# this group are 'optasm', 'optllvm', 'profasm', 'threaded1', 'threaded2',
+# this group are 'hpc', 'optasm', 'optllvm', 'profasm', 'threaded1', 'threaded2',
# 'profthreaded', 'ghci', and whichever of 'static/dyn' is not this GHC's
# default mode. Other ways should be set explicitly from .T files.
-config.compile_ways = ['normal', 'hpc']
-config.run_ways = ['normal', 'hpc']
+config.compile_ways = ['normal']
+config.run_ways = ['normal']
# ways that are not enabled by default, but can always be invoked explicitly
-config.other_ways = ['prof', 'normal_h',
+config.other_ways = ['hpc',
+ 'prof', 'normal_h',
'prof_hc_hb','prof_hb',
'prof_hd','prof_hy','prof_hr',
'sanity',
@@ -34,6 +35,7 @@ config.other_ways = ['prof', 'normal_h',
'compacting_gc',
]
+
if ghc_with_native_codegen:
config.compile_ways.append('optasm')
config.run_ways.append('optasm')
@@ -65,6 +67,16 @@ if windows:
else:
config.other_ways += winio_ways
+# LLVM
+if not config.unregisterised and not config.arch == "js" and config.have_llvm:
+ config.compile_ways.append('optllvm')
+ config.run_ways.append('optllvm')
+
+# HPC
+if not config.arch == "js":
+ config.compile_ways.append('hpc')
+ config.run_ways.append('hpc')
+
config.way_flags = {
'normal' : [],
'normal_h' : [],
@@ -179,13 +191,6 @@ llvm_ways = [x[0] for x in config.way_flags.items()
if '-fllvm' in x[1]]
def get_compiler_info():
- if config.unregisterised:
- print("Unregisterised build; skipping LLVM ways...")
- elif config.have_llvm:
- config.compile_ways.append('optllvm')
- config.run_ways.append('optllvm')
- else:
- print("Failed to find `llc` command; skipping LLVM ways...")
# Whether GHC itself was built using the LLVM backend. We need to know this
# since some tests in ext-interp fail when stage2 ghc is built using