Magnus pushed to branch wip/mangoiv/ci-stages at Glasgow Haskell Compiler / GHC

Commits:

3 changed files:

Changes:

  • hadrian/src/Base.hs
    ... ... @@ -22,6 +22,7 @@ module Base (
    22 22
         module Development.Shake.Util,
    
    23 23
     
    
    24 24
         Vec(..), (&%>),
    
    25
    +    exe,
    
    25 26
     
    
    26 27
         -- * Basic data types
    
    27 28
         module Hadrian.Package,
    
    ... ... @@ -56,8 +57,9 @@ import Development.Shake hiding (unit, (&%>), Normal)
    56 57
     import Development.Shake hiding (unit, (&%>), (*>), Normal)
    
    57 58
     #endif
    
    58 59
     import qualified Development.Shake as Shake
    
    60
    +import qualified Development.Shake.FilePath as Shake
    
    59 61
     import Development.Shake.Classes
    
    60
    -import Development.Shake.FilePath
    
    62
    +import Development.Shake.FilePath hiding (exe)
    
    61 63
     import Development.Shake.Util
    
    62 64
     import Hadrian.Oracles.DirectoryContents
    
    63 65
     import Hadrian.Utilities
    
    ... ... @@ -68,6 +70,18 @@ import GHC.Stack ( HasCallStack )
    68 70
     import Stage
    
    69 71
     import Way
    
    70 72
     
    
    73
    +isWasm :: Bool
    
    74
    +isWasm =
    
    75
    +#if defined(wasm32_HOST_ARCH)
    
    76
    +  True
    
    77
    +#else
    
    78
    +  False
    
    79
    +#endif
    
    80
    +
    
    81
    +exe :: FilePath
    
    82
    +exe | isWasm = "wasm"
    
    83
    +    | otherwise = Shake.exe
    
    84
    +
    
    71 85
     -- | Hadrian lives in the 'hadrianPath' directory of the GHC tree.
    
    72 86
     hadrianPath :: FilePath
    
    73 87
     hadrianPath = "hadrian"
    

  • hadrian/src/Builder.hs
    ... ... @@ -15,7 +15,6 @@ import Control.Exception.Extra (Partial)
    15 15
     import qualified Data.ByteString.Lazy.Char8 as BSL
    
    16 16
     import Development.Shake.Classes
    
    17 17
     import Development.Shake.Command
    
    18
    -import Development.Shake.FilePath
    
    19 18
     import GHC.Generics
    
    20 19
     import GHC.Platform.ArchOS (ArchOS(..), Arch(..), OS(..))
    
    21 20
     import qualified Hadrian.Builder as H
    

  • hadrian/src/Hadrian/Package.hs
    ... ... @@ -23,7 +23,7 @@ module Hadrian.Package (
    23 23
         ) where
    
    24 24
     
    
    25 25
     import Development.Shake.Classes
    
    26
    -import Development.Shake.FilePath
    
    26
    +import Development.Shake.FilePath ((<.>))
    
    27 27
     import GHC.Generics
    
    28 28
     
    
    29 29
     import Hadrian.Utilities