[Git][ghc/ghc][wip/reinstallable-th] JS needs ghcBootTh not ghcInternal

Teo Camarasu (@teo) gitlab at gitlab.haskell.org
Fri May 24 22:48:33 UTC 2024



Teo Camarasu pushed to branch wip/reinstallable-th at Glasgow Haskell Compiler / GHC


Commits:
2d9d8d70 by Teo Camarasu at 2024-05-24T23:48:21+01:00
JS needs ghcBootTh not ghcInternal

- - - - -


4 changed files:

- compiler/GHC/Runtime/Interpreter/JS.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Unit/Types.hs
- libraries/ghc-boot-th/ghc-boot-th.cabal.in


Changes:

=====================================
compiler/GHC/Runtime/Interpreter/JS.hs
=====================================
@@ -303,8 +303,8 @@ jsLinkObjects logger tmpfs tmp_dir cfg unit_env inst objs is_root = do
         }
 
   let units = preloadUnits (ue_units unit_env)
-              ++ [ghcInternalUnitId] -- don't forget ghc-internal which is an implicit dep
-                                     -- eg, for desugaring TH quotes
+              ++ [ghcBootThUnitId ] -- don't forget ghc-boot-th which is an implicit dep
+                                    -- eg, for desugaring TH quotes
 
   -- compute dependencies
   let link_spec = LinkSpec


=====================================
compiler/GHC/Unit/State.hs
=====================================
@@ -2272,7 +2272,7 @@ pprWithUnitState state = updSDocContext (\ctx -> ctx
 -- | Add package dependencies on the wired-in packages we use
 implicitPackageDeps :: DynFlags -> [UnitId]
 implicitPackageDeps dflags
-   = [ghcInternalUnitId | xopt TemplateHaskellQuotes dflags]
+   = [ghcBootThUnitId | xopt TemplateHaskellQuotes dflags]
    -- TODO: Should also include `base` and `ghc-prim` if we use those implicitly, but
    -- it is possible to not depend on base (for example, see `ghc-prim`)
 


=====================================
compiler/GHC/Unit/Types.hs
=====================================
@@ -68,6 +68,7 @@ module GHC.Unit.Types
    , mainUnitId
    , thisGhcUnitId
    , interactiveUnitId
+   , ghcBootThUnitId
 
    , primUnit
    , bignumUnit
@@ -595,10 +596,10 @@ Make sure you change 'GHC.Unit.State.findWiredInUnits' if you add an entry here.
 
 bignumUnitId, primUnitId, ghcInternalUnitId, baseUnitId, rtsUnitId,
   mainUnitId, thisGhcUnitId, interactiveUnitId,
-  experimentalUnitId :: UnitId
+  experimentalUnitId, ghcBootThUnitId  :: UnitId
 
 bignumUnit, primUnit, ghcInternalUnit, baseUnit, rtsUnit,
-  mainUnit, thisGhcUnit, interactiveUnit, experimentalUnit  :: Unit
+  mainUnit, thisGhcUnit, interactiveUnit, experimentalUnit :: Unit
 
 primUnitId        = UnitId (fsLit "ghc-prim")
 bignumUnitId      = UnitId (fsLit "ghc-bignum")
@@ -608,6 +609,7 @@ rtsUnitId         = UnitId (fsLit "rts")
 thisGhcUnitId     = UnitId (fsLit cProjectUnitId) -- See Note [GHC's Unit Id]
 interactiveUnitId = UnitId (fsLit "interactive")
 experimentalUnitId = UnitId (fsLit "ghc-experimental")
+ghcBootThUnitId = UnitId (fsLit "ghc-boot-th")
 
 primUnit          = RealUnit (Definite primUnitId)
 bignumUnit        = RealUnit (Definite bignumUnitId)


=====================================
libraries/ghc-boot-th/ghc-boot-th.cabal.in
=====================================
@@ -64,6 +64,7 @@ Library
             GHC.Internal.LanguageExtensions
             GHC.Internal.Lexeme
     else
+        ghc-options: -this-unit-id ghc-boot-th
         hs-source-dirs: @SourceRoot@
         build-depends:
             ghc-internal



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2d9d8d70f892a97ab57ab288da884a55603dc96c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2d9d8d70f892a97ab57ab288da884a55603dc96c
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/20240524/e1472bd1/attachment-0001.html>


More information about the ghc-commits mailing list