Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL at Glasgow Haskell Compiler / GHC
Commits:
-
15aa6fc8
by Sven Tennie at 2026-02-25T23:35:02+00:00
6 changed files:
- compiler/GHC/Driver/Config/Interpreter.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs
- hadrian/src/Rules/Generate.hs
Changes:
| ... | ... | @@ -17,8 +17,8 @@ import System.Directory |
| 17 | 17 | |
| 18 | 18 | initInterpOpts :: DynFlags -> IO InterpOpts
|
| 19 | 19 | initInterpOpts dflags = do
|
| 20 | - wasm_dyld <- makeAbsolute $ libTopDir dflags </> "dyld.mjs"
|
|
| 21 | - js_interp <- makeAbsolute $ libTopDir dflags </> "ghc-interp.js"
|
|
| 20 | + wasm_dyld <- makeAbsolute $ libDir dflags </> "dyld.mjs"
|
|
| 21 | + js_interp <- makeAbsolute $ libDir dflags </> "ghc-interp.js"
|
|
| 22 | 22 | pure $ InterpOpts
|
| 23 | 23 | { interpExternal = gopt Opt_ExternalInterpreter dflags
|
| 24 | 24 | , interpProg = pgm_i dflags
|
| ... | ... | @@ -60,7 +60,7 @@ module GHC.Driver.DynFlags ( |
| 60 | 60 | |
| 61 | 61 | -- ** System tool settings and locations
|
| 62 | 62 | programName, projectVersion,
|
| 63 | - ghcUsagePath, ghciUsagePath, topDir, libTopDir, toolDir,
|
|
| 63 | + ghcUsagePath, ghciUsagePath, topDir, libDir, toolDir,
|
|
| 64 | 64 | versionedAppDir, versionedFilePath,
|
| 65 | 65 | extraGccViaCFlags, globalPackageDatabasePath,
|
| 66 | 66 | |
| ... | ... | @@ -1506,8 +1506,8 @@ ghciUsagePath :: DynFlags -> FilePath |
| 1506 | 1506 | ghciUsagePath dflags = fileSettings_ghciUsagePath $ fileSettings dflags
|
| 1507 | 1507 | topDir :: DynFlags -> FilePath
|
| 1508 | 1508 | topDir dflags = fileSettings_topDir $ fileSettings dflags
|
| 1509 | -libTopDir :: DynFlags -> FilePath
|
|
| 1510 | -libTopDir dflags = fileSettings_libTopDir $ fileSettings dflags
|
|
| 1509 | +libDir :: DynFlags -> FilePath
|
|
| 1510 | +libDir dflags = fileSettings_libDir $ fileSettings dflags
|
|
| 1511 | 1511 | toolDir :: DynFlags -> Maybe FilePath
|
| 1512 | 1512 | toolDir dflags = fileSettings_toolDir $ fileSettings dflags
|
| 1513 | 1513 | extraGccViaCFlags :: DynFlags -> [String]
|
| ... | ... | @@ -3647,7 +3647,7 @@ compilerInfo dflags |
| 3647 | 3647 | -- Whether or not GHC was compiled using -prof
|
| 3648 | 3648 | ("GHC Profiled", showBool hostIsProfiled),
|
| 3649 | 3649 | ("Debug on", showBool debugIsOn),
|
| 3650 | - ("LibDir", libTopDir dflags),
|
|
| 3650 | + ("LibDir", libDir dflags),
|
|
| 3651 | 3651 | -- This is always an absolute path, unlike "Relative Global Package DB" which is
|
| 3652 | 3652 | -- in the settings file.
|
| 3653 | 3653 | ("Global Package DB", globalPackageDatabasePath dflags)
|
| ... | ... | @@ -184,7 +184,7 @@ data FileSettings = FileSettings |
| 184 | 184 | , fileSettings_toolDir :: Maybe FilePath -- ditto
|
| 185 | 185 | , fileSettings_topDir :: FilePath -- ditto
|
| 186 | 186 | , fileSettings_globalPackageDatabase :: FilePath
|
| 187 | - , fileSettings_libTopDir :: FilePath
|
|
| 187 | + , fileSettings_libDir :: FilePath
|
|
| 188 | 188 | }
|
| 189 | 189 | |
| 190 | 190 |
| ... | ... | @@ -148,7 +148,7 @@ initSettings top_dir = do |
| 148 | 148 | |
| 149 | 149 | baseUnitId <- getSetting_raw "base unit-id"
|
| 150 | 150 | |
| 151 | - lib_top_dir <- getSetting "Lib TopDir"
|
|
| 151 | + lib_dir <- getSetting "LibDir"
|
|
| 152 | 152 | |
| 153 | 153 | return $ Settings
|
| 154 | 154 | { sGhcNameVersion = GhcNameVersion
|
| ... | ... | @@ -161,7 +161,7 @@ initSettings top_dir = do |
| 161 | 161 | , fileSettings_ghciUsagePath = ghci_usage_msg_path
|
| 162 | 162 | , fileSettings_toolDir = mtool_dir
|
| 163 | 163 | , fileSettings_topDir = top_dir
|
| 164 | - , fileSettings_libTopDir = lib_top_dir
|
|
| 164 | + , fileSettings_libDir = lib_dir
|
|
| 165 | 165 | , fileSettings_globalPackageDatabase = globalpkgdb_path
|
| 166 | 166 | }
|
| 167 | 167 |
| ... | ... | @@ -507,7 +507,7 @@ generateSettings settingsFile = do |
| 507 | 507 | , ("RTS ways", unwords . map show . Set.toList <$> getRtsWays)
|
| 508 | 508 | , ("Relative Global Package DB", pure rel_pkg_db)
|
| 509 | 509 | , ("base unit-id", pure base_unit_id)
|
| 510 | - , ("Lib TopDir", pure lib_topDir)
|
|
| 510 | + , ("LibDir", pure lib_topDir)
|
|
| 511 | 511 | ]
|
| 512 | 512 | let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")"
|
| 513 | 513 | pure $ case settings of
|