[Git][ghc/ghc][wip/T24624] wip

Teo Camarasu (@teo) gitlab at gitlab.haskell.org
Wed Apr 10 12:06:35 UTC 2024



Teo Camarasu pushed to branch wip/T24624 at Glasgow Haskell Compiler / GHC


Commits:
ad03706b by Teo Camarasu at 2024-04-10T13:06:29+01:00
wip

- - - - -


3 changed files:

- hadrian/src/Rules/Compile.hs
- hadrian/src/Settings/Builders/Ghc.hs
- hadrian/src/Settings/Packages.hs


Changes:

=====================================
hadrian/src/Rules/Compile.hs
=====================================
@@ -13,6 +13,7 @@ import Rules.Generate
 import Settings
 import Target
 import Utilities
+import Packages
 
 import qualified Text.Parsec as Parsec
 
@@ -219,6 +220,9 @@ compileHsObjectAndHi rs objpath = do
   (src, deps) <- lookupDependencies (ctxPath -/- ".dependencies") objpath
   need (src:deps)
 
+  when (stage == Stage1 && C.package ctx == ghc) $ do
+    need [root -/- stageString stage -/- "bin" -/- "ghc-iserv"]
+
   -- The .dependencies file lists indicating inputs. ghc will
   -- generally read more *.hi and *.hi-boot files (direct inputs).
   -- Allow such reads (see https://gitlab.haskell.org/ghc/ghc/wikis/Developing-Hadrian#haskell-object-files-and-hi-inputs)


=====================================
hadrian/src/Settings/Builders/Ghc.hs
=====================================
@@ -48,6 +48,7 @@ compileAndLinkHs = (builder (Ghc CompileHs) ||^ builder (Ghc LinkHs)) ? do
               arg "-dynamic-too"
             , commonGhcArgs
             , ghcLinkArgs
+            , stage1 ? package ghc ? builder (Ghc CompileHs) ? mconcat [arg "-fexternal-interpreter", arg "-pgmi ../../stage1/bin/ghc-iserv"]
             , defaultGhcWarningsArgs
             , builder (Ghc CompileHs) ? arg "-c"
             , getInputs


=====================================
hadrian/src/Settings/Packages.hs
=====================================
@@ -155,10 +155,9 @@ packageArgs = do
           -- compiler comes with the same versions as the one we are building.
           --
             builder (Cabal Setup) ? cabalExtraDirs ffiIncludeDir ffiLibraryDir
-          , builder (Cabal Flags) ? ifM stage0
-              (andM [cross, bootCross] `cabalFlag` "internal-interpreter")
-              (arg "internal-interpreter")
-
+          , builder (Cabal Flags) ? mconcat
+             [ arg "internal-interpreter"
+             ]
           ]
 
         , package unix ? builder (Cabal Flags) ? arg "+os-string"



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ad03706bbac5111d818e6f039d749a94755259c0
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/20240410/ab471676/attachment-0001.html>


More information about the ghc-commits mailing list