summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Main.hs
diff options
context:
space:
mode:
authordoyougnu <jeffrey.young@iohk.io>2022-06-03 11:49:47 -0400
committerdoyougnu <jeffrey.young@iohk.io>2022-06-13 13:42:48 -0400
commiteda668b0f826be5f480b307c74bd3542c6f75a3f (patch)
tree43cd67d8014a2ec754325d4422da529c7316e6b5 /compiler/GHC/Driver/Main.hs
parent2b9c8cd6b7978f095a94d882bb4ca4e6410b0c10 (diff)
downloadhaskell-eda668b0f826be5f480b307c74bd3542c6f75a3f.tar.gz
JS-Backend: rebased to master 468f919b
First rebase of the JS-Backend. This rebase includes the JS backend combined with !7442 (new backend design). Unfortunately we have to short circuit the new backend design because the JS backend takes over after STG and not after StgToCmm. What's working: - hadrian builds JS backend - JS backend outputs .js files and "links" them What still has to be done: - JS backend is missing core js libraries as we add these we discover bugs in the linker and js rts.
Diffstat (limited to 'compiler/GHC/Driver/Main.hs')
-rw-r--r--compiler/GHC/Driver/Main.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index ff1adea1c3..7b8be4cb91 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -1720,8 +1720,8 @@ hscGenHardCode hsc_env cgguts location output_filename = do
-- next withTiming after this will be "Assembler" (hard code only).
let do_code_gen =
withTiming logger (text "CodeGen"<+>brackets (ppr this_mod)) (const ())
- $ case backend dflags of
- JavaScript ->
+ $ case backendCodeOutput (backend dflags) of
+ JSCodeOutput ->
do
let js_config = initStgToJSConfig dflags
cg_infos = Nothing
@@ -1756,9 +1756,10 @@ hscGenHardCode hsc_env cgguts location output_filename = do
(output_filename, (_stub_h_exists, stub_c_exists), foreign_fps, cg_infos)
<- {-# SCC "codeOutput" #-}
- codeOutput logger tmpfs dflags (hsc_units hsc_env)
- this_mod output_filename location foreign_stubs
- foreign_files dependencies rawcmms1
+ codeOutput logger tmpfs llvm_config
+ dflags (hsc_units hsc_env) this_mod
+ output_filename location foreign_stubs
+ foreign_files dependencies rawcmms1
return (output_filename, stub_c_exists, foreign_fps, Just cg_infos)
do_code_gen