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

Commits:

1 changed file:

Changes:

  • hadrian/src/Rules/Generate.hs
    ... ... @@ -488,16 +488,11 @@ generateSettings settingsFile includeLibDir package_db_path = do
    488 488
             Stage3 -> pkgUnitId Stage2 base
    
    489 489
     
    
    490 490
         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 491
             -- E.g. the Stage2 compiler lives in _build/stage1
    
    496 492
             -- So, we need to decrement the stage to get the correct directory
    
    497 493
             stage_dir_stage = predStage stage
    
    498 494
     
    
    499 495
         rel_lib_topDir :: FilePath <- expr $ stageLibPath stage_dir_stage
    
    500
    -    lib_topDir :: FilePath <- expr $ make_absolute rel_lib_topDir
    
    501 496
     
    
    502 497
         settings <- traverse sequence $
    
    503 498
               [ ("unlit command", ("$topdir/../bin/" <>) <$> expr (programName (ctx { Context.package = unlit })))
    
    ... ... @@ -506,7 +501,7 @@ generateSettings settingsFile includeLibDir package_db_path = do
    506 501
               , ("Relative Global Package DB", pure rel_pkg_db)
    
    507 502
               , ("base unit-id", pure base_unit_id)
    
    508 503
               ]
    
    509
    -          ++ ([("LibDir", pure lib_topDir) | includeLibDir])
    
    504
    +          ++ ([("LibDir", pure rel_lib_topDir) | includeLibDir])
    
    510 505
     
    
    511 506
         let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")"
    
    512 507
         pure $ case settings of