Sven Tennie pushed to branch wip/supersven/libDir-setting at Glasgow Haskell Compiler / GHC Commits: 48964730 by Sven Tennie at 2026-05-04T18:32:30+02:00 WIP: relative LibDir - - - - - 1 changed file: - hadrian/src/Rules/Generate.hs Changes: ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -488,16 +488,11 @@ generateSettings settingsFile includeLibDir package_db_path = do Stage3 -> pkgUnitId Stage2 base let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path - make_absolute rel_path = do - abs_path <- liftIO (makeAbsolute rel_path) - fixAbsolutePathOnWindows abs_path - -- E.g. the Stage2 compiler lives in _build/stage1 -- So, we need to decrement the stage to get the correct directory stage_dir_stage = predStage stage rel_lib_topDir :: FilePath <- expr $ stageLibPath stage_dir_stage - lib_topDir :: FilePath <- expr $ make_absolute rel_lib_topDir settings <- traverse sequence $ [ ("unlit command", ("$topdir/../bin/" <>) <$> expr (programName (ctx { Context.package = unlit }))) @@ -506,7 +501,7 @@ generateSettings settingsFile includeLibDir package_db_path = do , ("Relative Global Package DB", pure rel_pkg_db) , ("base unit-id", pure base_unit_id) ] - ++ ([("LibDir", pure lib_topDir) | includeLibDir]) + ++ ([("LibDir", pure rel_lib_topDir) | includeLibDir]) let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/489647303f40b3910b94071e957ece29... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/489647303f40b3910b94071e957ece29... You're receiving this email because of your account on gitlab.haskell.org.