Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL at Glasgow Haskell Compiler / GHC Commits: 6a2aa024 by Sven Tennie at 2026-02-25T19:34:01+00:00 Use topLibDir - - - - - 5d7e35f3 by Sven Tennie at 2026-02-25T20:52:55+00:00 Fix stages in generateSettings - - - - - 2 changed files: - compiler/GHC/Driver/Config/Interpreter.hs - hadrian/src/Rules/Generate.hs Changes: ===================================== compiler/GHC/Driver/Config/Interpreter.hs ===================================== @@ -17,8 +17,8 @@ import System.Directory initInterpOpts :: DynFlags -> IO InterpOpts initInterpOpts dflags = do - wasm_dyld <- makeAbsolute $ topDir dflags > "dyld.mjs" - js_interp <- makeAbsolute $ topDir dflags > "ghc-interp.js" + wasm_dyld <- makeAbsolute $ libTopDir dflags > "dyld.mjs" + js_interp <- makeAbsolute $ libTopDir dflags > "ghc-interp.js" pure $ InterpOpts { interpExternal = gopt Opt_ExternalInterpreter dflags , interpProg = pgm_i dflags ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -469,7 +469,8 @@ generateSettings :: FilePath -> Expr String generateSettings settingsFile = do ctx <- getContext stage <- getStage - isCrossStage <- expr $ crossStage stage + let ghcStage = predStage stage + isCrossStage <- expr $ crossStage ghcStage package_db_path <- expr $ do let get_pkg_db stg = packageDbPath (PackageDbLoc stg Final) @@ -489,7 +490,7 @@ generateSettings settingsFile = do Stage2 -> pkgUnitId Stage1 base Stage3 -> pkgUnitId Stage2 base - rel_lib_topDir :: FilePath <- expr $ buildRoot <&> (-/- stageString (if isCrossStage then stage else predStage stage) -/- "lib") + rel_lib_topDir :: FilePath <- expr $ buildRoot <&> (-/- stageString (if isCrossStage then stage else ghcStage) -/- "lib") let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path make_absolute rel_path = do abs_path <- liftIO (makeAbsolute rel_path) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6c99ca77f745b7c4565fe363d91a190... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6c99ca77f745b7c4565fe363d91a190... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Sven Tennie (@supersven)