Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • hadrian/src/Rules/BinaryDist.hs
    1 1
     {-# LANGUAGE TupleSections, MultiWayIf #-}
    
    2 2
     module Rules.BinaryDist where
    
    3 3
     
    
    4
    +import Base (haddockDeps)
    
    4 5
     import CommandLine
    
    5 6
     import Context
    
    6 7
     import Data.Either
    
    ... ... @@ -214,6 +215,12 @@ buildBinDistDir root conf@BindistConfig{..} = do
    214 215
                   IO.removeFile versioned_runhaskell_path <|> return ()
    
    215 216
                   IO.createFileLink version_prog versioned_runhaskell_path
    
    216 217
     
    
    218
    +    -- The haddock builder hardcodes Stage1 for its resource files, so for cross
    
    219
    +    -- bindists (library_stage = Stage2) the html/latex theme dirs would otherwise
    
    220
    +    -- not be present in the stage2 lib dir.  The copy rules in Generate.hs already
    
    221
    +    -- know how to build these files for any stage; we just have to need them first.
    
    222
    +    need =<< haddockDeps library_stage
    
    223
    +
    
    217 224
         copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir
    
    218 225
     
    
    219 226
         -- Regenerate settings file without LibDir. For bindists, LibDir should