[Git][ghc/ghc][wip/js-staging] Linker: link platform shim before the others

Sylvain Henry (@hsyl20) gitlab at gitlab.haskell.org
Wed Aug 24 16:05:28 UTC 2022



Sylvain Henry pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC


Commits:
7dbf250e by Sylvain Henry at 2022-08-24T18:08:08+02:00
Linker: link platform shim before the others

- - - - -


1 changed file:

- compiler/GHC/StgToJS/Linker/Shims.hs


Changes:

=====================================
compiler/GHC/StgToJS/Linker/Shims.hs
=====================================
@@ -82,33 +82,36 @@ instance Ord (Shim' a) where
 
 -- | A tag to label shim payloads, the ordering dictates the ordering shim files
 -- are linked.
-data ShimLbl = ShStructs
-             | ShProfiling
-             | ShRts
-             | ShGc
-             | ShArith
-             | ShCompact
-             | ShDebug
-             | ShEnum
-             | ShEnvironment
-             | ShErrno
-             | ShGoog
-             | ShHsCore
-             | ShMd5
-             | ShMem
-             | ShNodeExports
-             | ShObject
-             | ShPlatform
-             | ShStablePtr
-             | ShStaticPtr
-             | ShStm
-             | ShString
-             | ShThread
-             | ShUnicode
-             | ShVerify
-             | ShWeak
-             | ShBase
-             deriving (Eq, Ord)
+data ShimLbl
+    -- Platform must be loaded quite early as it sets h$isNode which is used by
+    -- other shims (e.g. ShEnvironment)
+  = ShPlatform
+  | ShStructs
+  | ShProfiling
+  | ShRts
+  | ShGc
+  | ShArith
+  | ShCompact
+  | ShDebug
+  | ShEnum
+  | ShEnvironment
+  | ShErrno
+  | ShGoog
+  | ShHsCore
+  | ShMd5
+  | ShMem
+  | ShNodeExports
+  | ShObject
+  | ShStablePtr
+  | ShStaticPtr
+  | ShStm
+  | ShString
+  | ShThread
+  | ShUnicode
+  | ShVerify
+  | ShWeak
+  | ShBase
+  deriving (Eq, Ord)
 
 -- | Given a file path, check that the file is a shim file and construct a Shim
 -- value if so. This is the sole exported constructor for a Shim type.



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7dbf250ea9e49fa3802da97cd71f5b1118002319

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7dbf250ea9e49fa3802da97cd71f5b1118002319
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220824/954c33a2/attachment-0001.html>


More information about the ghc-commits mailing list