summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2023-02-02 16:01:56 +0100
committerSylvain Henry <sylvain@haskus.fr>2023-02-06 09:36:57 +0100
commit9325748067966f6e08adbb182f2c04d9e86f7ad8 (patch)
tree4f46dc7807e8e3800f186f864e25519eae31a3a9 /compiler
parent3c0f0c6d99486502c72e6514a40e7264baaa6afc (diff)
downloadhaskell-wip/T22740.tar.gz
JS: replace "js" architecture with "javascript"wip/T22740
Despite Cabal supporting any architecture name, `cabal --check` only supports a few built-in ones. Sadly `cabal --check` is used by Hackage hence using any non built-in name in a package (e.g. `arch(js)`) is rejected and the package is prevented from being uploaded on Hackage. Luckily built-in support for the `javascript` architecture was added for GHCJS a while ago. In order to allow newer `base` to be uploaded on Hackage we make the switch from `js` to `javascript` architecture. Fixes #22740. Co-authored-by: Ben Gamari <ben@smart-cactus.org>
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs
index 2c4857477a..748a54fdef 100644
--- a/compiler/GHC.hs
+++ b/compiler/GHC.hs
@@ -357,7 +357,7 @@ import GHC.Utils.Monad
import GHC.Utils.Misc
import GHC.Utils.Outputable
import GHC.Utils.Panic
-#if !defined(js_HOST_ARCH)
+#if !defined(javascript_HOST_ARCH)
import GHC.Utils.Panic.Plain
#endif
import GHC.Utils.Logger
@@ -560,7 +560,7 @@ withCleanupSession ghc = ghc `MC.finally` cleanup
initGhcMonad :: GhcMonad m => Maybe FilePath -> m ()
initGhcMonad mb_top_dir = setSession =<< liftIO ( do
-#if !defined(js_HOST_ARCH)
+#if !defined(javascript_HOST_ARCH)
-- The call to c_keepCAFsForGHCi must not be optimized away. Even in non-debug builds.
-- So we can't use assertM here.
-- See Note [keepCAFsForGHCi] in keepCAFsForGHCi.c for details about why.
@@ -1962,7 +1962,7 @@ mkApiErr :: DynFlags -> SDoc -> GhcApiError
mkApiErr dflags msg = GhcApiError (showSDoc dflags msg)
-#if !defined(js_HOST_ARCH)
+#if !defined(javascript_HOST_ARCH)
foreign import ccall unsafe "keepCAFsForGHCi"
c_keepCAFsForGHCi :: IO Bool
#endif