[Git][ghc/ghc][wip/js-staging] base: conditional js-sources

Sylvain Henry (@hsyl20) gitlab at gitlab.haskell.org
Tue Sep 20 07:55:47 UTC 2022



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


Commits:
1dc7e8aa by Sylvain Henry at 2022-09-20T09:58:47+02:00
base: conditional js-sources

- - - - -


1 changed file:

- libraries/base/base.cabal


Changes:

=====================================
libraries/base/base.cabal
=====================================
@@ -359,7 +359,7 @@ Library
         System.Environment.ExecutablePath
         System.CPUTime.Utils
 
-    if !os(ghcjs)
+    if !arch(js)
       c-sources:
           cbits/DarwinUtils.c
           cbits/PrelIOUtils.c
@@ -375,12 +375,13 @@ Library
           cbits/CastFloatWord.cmm
           cbits/StackCloningDecoding.cmm
 
-    js-sources:
-        -- "platform" must be linked first because it defines global constants
-        -- (e.g. h$isNode)
-        jsbits/platform.js
-        jsbits/base.js
-        jsbits/errno.js
+    if arch(js)
+      js-sources:
+          -- "platform" must be linked first because it defines global constants
+          -- (e.g. h$isNode)
+          jsbits/platform.js
+          jsbits/base.js
+          jsbits/errno.js
 
     include-dirs: include
     includes:



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1dc7e8aa7dfac087a02bfb844f8210ebe08554d9

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1dc7e8aa7dfac087a02bfb844f8210ebe08554d9
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/20220920/19bdf8bb/attachment-0001.html>


More information about the ghc-commits mailing list