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

Commits:

1 changed file:

Changes:

  • compiler/GHC/Settings/IO.hs
    ... ... @@ -152,9 +152,13 @@ initSettings top_dir = do
    152 152
       -- LibDir is optional. If not set, derive it from topDir. This allows
    
    153 153
       -- bindists to work without explicitly setting LibDir, but gives us the
    
    154 154
       -- option to override it for inplace test compilers (the "stage2
    
    155
    -  -- cross-compiler" scenario).
    
    156
    -  let lib_dir = fromRight top_dir $
    
    157
    -                  getRawFilePathSetting top_dir settingsFile mySettings "LibDir"
    
    155
    +  -- cross-compiler" scenario). If LibDir is a relative path, it is
    
    156
    +  -- interpreted relative to topDir.
    
    157
    +  let lib_dir_raw = fromRight top_dir $
    
    158
    +                      getRawFilePathSetting top_dir settingsFile mySettings "LibDir"
    
    159
    +      lib_dir = if isRelative lib_dir_raw
    
    160
    +                then top_dir </> lib_dir_raw
    
    161
    +                else lib_dir_raw
    
    158 162
     
    
    159 163
       return $ Settings
    
    160 164
         { sGhcNameVersion = GhcNameVersion