Sven Tennie pushed to branch wip/supersven/libDir-setting at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • hadrian/src/Rules/Generate.hs
    ... ... @@ -25,7 +25,6 @@ import Utilities
    25 25
     import GHC.Toolchain as Toolchain hiding (HsCpp(HsCpp))
    
    26 26
     import GHC.Platform.ArchOS
    
    27 27
     import Settings.Program (ghcWithInterpreter)
    
    28
    -import Hadrian.Oracles.Path
    
    29 28
     
    
    30 29
     -- | Track this file to rebuild generated files whenever it changes.
    
    31 30
     trackGenerateHs :: Expr ()
    
    ... ... @@ -488,16 +487,11 @@ generateSettings settingsFile includeLibDir package_db_path = do
    488 487
             Stage3 -> pkgUnitId Stage2 base
    
    489 488
     
    
    490 489
         let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path
    
    491
    -        make_absolute rel_path = do
    
    492
    -          abs_path <- liftIO (makeAbsolute rel_path)
    
    493
    -          fixAbsolutePathOnWindows abs_path
    
    494
    -
    
    495 490
             -- E.g. the Stage2 compiler lives in _build/stage1
    
    496 491
             -- So, we need to decrement the stage to get the correct directory
    
    497 492
             stage_dir_stage = predStage stage
    
    498 493
     
    
    499 494
         rel_lib_topDir :: FilePath <- expr $ stageLibPath stage_dir_stage
    
    500
    -    lib_topDir :: FilePath <- expr $ make_absolute rel_lib_topDir
    
    501 495
     
    
    502 496
         settings <- traverse sequence $
    
    503 497
               [ ("unlit command", ("$topdir/../bin/" <>) <$> expr (programName (ctx { Context.package = unlit })))
    
    ... ... @@ -506,7 +500,7 @@ generateSettings settingsFile includeLibDir package_db_path = do
    506 500
               , ("Relative Global Package DB", pure rel_pkg_db)
    
    507 501
               , ("base unit-id", pure base_unit_id)
    
    508 502
               ]
    
    509
    -          ++ ([("LibDir", pure lib_topDir) | includeLibDir])
    
    503
    +          ++ ([("LibDir", pure rel_lib_topDir) | includeLibDir])
    
    510 504
     
    
    511 505
         let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")"
    
    512 506
         pure $ case settings of