File tree Expand file tree Collapse file tree 13 files changed +566
-392
lines changed Expand file tree Collapse file tree 13 files changed +566
-392
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -105,6 +105,28 @@ package *
105
105
executable-dynamic: False
106
106
executable-static: False
107
107
108
+ if os(wasi)
109
+ package *
110
+ shared: True
111
+ package rts
112
+ ghc-options: "-optc-DProjectVersion=\"913\""
113
+ ghc-options: "-optc-DRtsWay=\"v\""
114
+ ghc-options: "-optc-DHostPlatform=\"wasm32-wasi\""
115
+ ghc-options: "-optc-DHostArch=\"wasm32\""
116
+ ghc-options: "-optc-DHostOS=\"unknown\""
117
+ ghc-options: "-optc-DHostVendor=\"unknown\""
118
+ ghc-options: "-optc-DBuildPlatform=\"FIXME\""
119
+ ghc-options: "-optc-DBuildArch=\"FIXME\""
120
+ ghc-options: "-optc-DBuildOS=\"FIXME\""
121
+ ghc-options: "-optc-DBuildVendor=\"FIXME\""
122
+ ghc-options: "-optc-DGhcUnregisterised=\"FIXME\""
123
+ ghc-options: "-optc-DTablesNextToCode=\"FIXME\""
124
+ ghc-options: "-optc-DFS_NAMESPACE=rts"
125
+ ghc-options: "-optl-Wl,--export-dynamic"
126
+ ghc-options: "-optc-fvisibility=default"
127
+ ghc-options: "-optc-fvisibility-inlines-hidden"
128
+ flags: -tables-next-to-code
129
+
108
130
-- Maybe we should fix this with some import
109
131
if os(linux)
110
132
package rts
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -506,7 +506,7 @@ loopFixedModule key loc done = do
506
506
-- part of the compiler.
507
507
lookupIfaceByModuleHsc hsc_env (mnkToModule key) >>= \ case
508
508
Just iface -> return (M. Succeeded iface)
509
- Nothing -> readIface (hsc_logger hsc_env) (hsc_dflags hsc_env) (hsc_NC hsc_env) (mnkToModule key) (ml_hi_file loc)
509
+ Nothing -> readIface (hsc_hooks hsc_env) ( hsc_logger hsc_env) (hsc_dflags hsc_env) (hsc_NC hsc_env) (mnkToModule key) (ml_hi_file loc)
510
510
case read_result of
511
511
M. Succeeded iface -> do
512
512
-- Computer information about this node
Original file line number Diff line number Diff line change @@ -1299,7 +1299,7 @@ hscDesugarAndSimplify summary (FrontendTypecheck tc_result) tc_warnings mb_old_h
1299
1299
-- when compiling gHC_PRIM without generating code (e.g. with
1300
1300
-- Haddock), we still want the virtual interface in the cache
1301
1301
if ms_mod summary == gHC_PRIM
1302
- then return $ HscUpdate (getGhcPrimIface hsc_env)
1302
+ then return $ HscUpdate (getGhcPrimIface (hsc_hooks hsc_env) )
1303
1303
else return $ HscUpdate iface
1304
1304
1305
1305
@@ -1314,7 +1314,7 @@ hscDesugarAndSimplify summary (FrontendTypecheck tc_result) tc_warnings mb_old_h
1314
1314
-- when compiling gHC_PRIM without generating code (e.g. with
1315
1315
-- Haddock), we still want the virtual interface in the cache
1316
1316
if ms_mod summary == gHC_PRIM
1317
- then return $ HscUpdate (getGhcPrimIface hsc_env)
1317
+ then return $ HscUpdate (getGhcPrimIface (hsc_hooks hsc_env) )
1318
1318
else return $ HscUpdate iface
1319
1319
1320
1320
{-
Original file line number Diff line number Diff line change @@ -1603,7 +1603,7 @@ executeCompileNode k n !old_hmi hug mrehydrate_mods mni = do
1603
1603
executeCompileNodeFixed hsc_env MakeEnv {diag_wrapper, env_messager} mod loc =
1604
1604
wrapAction diag_wrapper hsc_env $ do
1605
1605
forM_ env_messager $ \ hscMessage -> hscMessage hsc_env (k, n) UpToDate (ModuleNode [] (ModuleNodeFixed mod loc))
1606
- read_result <- readIface (hsc_logger hsc_env) (hsc_dflags hsc_env) (hsc_NC hsc_env) (mnkToModule mod ) (ml_hi_file loc)
1606
+ read_result <- readIface (hsc_hooks hsc_env) ( hsc_logger hsc_env) (hsc_dflags hsc_env) (hsc_NC hsc_env) (mnkToModule mod ) (ml_hi_file loc)
1607
1607
case read_result of
1608
1608
M. Failed interface_err ->
1609
1609
let mn = mnkModuleName mod
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ module GHC.Driver.Pipeline (
44
44
45
45
46
46
import GHC.Prelude
47
+ import GHC.Builtin.Names
47
48
48
49
import GHC.Platform
49
50
@@ -823,10 +824,10 @@ hscGenBackendPipeline pipe_env hsc_env mod_sum result = do
823
824
-- Add the object linkable to the potential bytecode linkable which was generated in HscBackend.
824
825
return (mlinkable { homeMod_object = Just linkable })
825
826
826
- -- when building ghc-internal with cabal-install, we still want the virtual
827
- -- interface for gHC_PRIM in the cache
827
+ -- when building ghc-internal with --make (e.g. with cabal-install) , we want
828
+ -- the virtual interface for gHC_PRIM in the cache, not the empty one.
828
829
let miface_final
829
- | ms_mod mod_sum == gHC_PRIM = getGhcPrimIface hsc_env
830
+ | ms_mod mod_sum == gHC_PRIM = getGhcPrimIface (hsc_hooks hsc_env)
830
831
| otherwise = miface
831
832
return (miface_final, final_linkable)
832
833
You can’t perform that action at this time.
0 commit comments