Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • hadrian/src/Settings/Default.hs
    ... ... @@ -80,7 +80,6 @@ stageBootPackages = return
    80 80
     stage0Packages :: Action [Package]
    
    81 81
     stage0Packages = do
    
    82 82
         cross <- flag CrossCompiling
    
    83
    -    haveCurses <- any (/= "") <$> traverse setting [ CursesIncludeDir, CursesLibDir ]
    
    84 83
         return $ [ cabalSyntax
    
    85 84
                  , cabal
    
    86 85
                  , compiler
    
    ... ... @@ -116,7 +115,11 @@ stage0Packages = do
    116 115
                  -- that confused Hadrian, so we must make those a stage0 package as well.
    
    117 116
                  -- Once we drop `Win32`/`unix` it should be possible to drop those too.
    
    118 117
                  ]
    
    119
    -          ++ [ terminfo | not windowsHost, (not cross || haveCurses) ]
    
    118
    +          -- Currently, we have no way to provide paths to [n]curses libs for
    
    119
    +          -- both - build and target - in cross builds. Thus, we only build it
    
    120
    +          -- for upper stages. As we only use stage0 to build upper stages,
    
    121
    +          -- this should be fine.
    
    122
    +          ++ [ terminfo | not windowsHost, not cross ]
    
    120 123
               ++ [ timeout  | windowsHost                                ]
    
    121 124
     
    
    122 125
     -- | Packages built in 'Stage1' by default. You can change this in "UserSettings".
    
    ... ... @@ -136,6 +139,7 @@ stage1Packages = do
    136 139
         libraries0 <- filter good_stage0_package <$> stage0Packages
    
    137 140
         cross      <- flag CrossCompiling
    
    138 141
         winTarget  <- isWinTarget
    
    142
    +    haveCurses <- any (/= "") <$> traverse setting [ CursesIncludeDir, CursesLibDir ]
    
    139 143
     
    
    140 144
         let when c xs = if c then xs else mempty
    
    141 145
     
    
    ... ... @@ -185,6 +189,10 @@ stage1Packages = do
    185 189
             [ -- See Note [Hadrian's ghci-wrapper package]
    
    186 190
               ghciWrapper
    
    187 191
             ]
    
    192
    +      , when (cross && haveCurses)
    
    193
    +        [
    
    194
    +          terminfo
    
    195
    +        ]
    
    188 196
           ]
    
    189 197
     
    
    190 198
     -- | Packages built in 'Stage2' by default. You can change this in "UserSettings".