Skip to content

Commit 13b69bc

Browse files
author
GHC GitLab CI
committed
Sync aggregated branch with rebased branch changes
1 parent af3969d commit 13b69bc

File tree

13 files changed

+566
-392
lines changed

13 files changed

+566
-392
lines changed

Makefile

Lines changed: 455 additions & 143 deletions
Large diffs are not rendered by default.

cabal.project.stage3.javascript-unknown-ghcjs renamed to cabal.project.stage3

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,28 @@ package *
105105
executable-dynamic: False
106106
executable-static: False
107107

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+
108130
-- Maybe we should fix this with some import
109131
if os(linux)
110132
package rts

cabal.project.stage3.x86_64-unknown-linux-musl

Lines changed: 0 additions & 165 deletions
This file was deleted.

compiler/GHC/Driver/Downsweep.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ loopFixedModule key loc done = do
506506
-- part of the compiler.
507507
lookupIfaceByModuleHsc hsc_env (mnkToModule key) >>= \case
508508
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)
510510
case read_result of
511511
M.Succeeded iface -> do
512512
-- Computer information about this node

compiler/GHC/Driver/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ hscDesugarAndSimplify summary (FrontendTypecheck tc_result) tc_warnings mb_old_h
12991299
-- when compiling gHC_PRIM without generating code (e.g. with
13001300
-- Haddock), we still want the virtual interface in the cache
13011301
if ms_mod summary == gHC_PRIM
1302-
then return $ HscUpdate (getGhcPrimIface hsc_env)
1302+
then return $ HscUpdate (getGhcPrimIface (hsc_hooks hsc_env))
13031303
else return $ HscUpdate iface
13041304

13051305

@@ -1314,7 +1314,7 @@ hscDesugarAndSimplify summary (FrontendTypecheck tc_result) tc_warnings mb_old_h
13141314
-- when compiling gHC_PRIM without generating code (e.g. with
13151315
-- Haddock), we still want the virtual interface in the cache
13161316
if ms_mod summary == gHC_PRIM
1317-
then return $ HscUpdate (getGhcPrimIface hsc_env)
1317+
then return $ HscUpdate (getGhcPrimIface (hsc_hooks hsc_env))
13181318
else return $ HscUpdate iface
13191319

13201320
{-

compiler/GHC/Driver/Make.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,7 @@ executeCompileNode k n !old_hmi hug mrehydrate_mods mni = do
16031603
executeCompileNodeFixed hsc_env MakeEnv{diag_wrapper, env_messager} mod loc =
16041604
wrapAction diag_wrapper hsc_env $ do
16051605
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)
16071607
case read_result of
16081608
M.Failed interface_err ->
16091609
let mn = mnkModuleName mod

compiler/GHC/Driver/Pipeline.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ module GHC.Driver.Pipeline (
4444

4545

4646
import GHC.Prelude
47+
import GHC.Builtin.Names
4748

4849
import GHC.Platform
4950

@@ -823,10 +824,10 @@ hscGenBackendPipeline pipe_env hsc_env mod_sum result = do
823824
-- Add the object linkable to the potential bytecode linkable which was generated in HscBackend.
824825
return (mlinkable { homeMod_object = Just linkable })
825826

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.
828829
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)
830831
| otherwise = miface
831832
return (miface_final, final_linkable)
832833

0 commit comments

Comments
 (0)