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

Commits:

2 changed files:

Changes:

  • hadrian/src/Oracles/Flag.hs
    1
    -{-# LANGUAGE MultiWayIf #-}
    
    2
    -
    
    3 1
     module Oracles.Flag (
    
    4 2
         Flag (..), flag, getFlag,
    
    5 3
         BuildFlag(..), buildFlag,
    
    6 4
         targetRTSLinkerOnlySupportsSharedLibs,
    
    7 5
         targetSupportsSharedLibs,
    
    8
    -    targetSupportsGhciObjects,
    
    9 6
         targetSupportsThreadedRts,
    
    10 7
         targetSupportsSMP,
    
    11 8
         useLibdw,
    
    ... ... @@ -86,14 +83,6 @@ buildFlag f st =
    86 83
     getFlag :: Flag -> Expr c b Bool
    
    87 84
     getFlag = expr . flag
    
    88 85
     
    
    89
    --- | Does the target platform support object merging (and therefore we can build GHCi objects
    
    90
    --- when appropriate).
    
    91
    -targetSupportsGhciObjects :: Stage -> Action Bool
    
    92
    -targetSupportsGhciObjects stage = do
    
    93
    -  has_merge_objs <- isJust <$> queryTargetTarget stage tgtMergeObjs
    
    94
    -  only_shared_libs <- targetRTSLinkerOnlySupportsSharedLibs stage
    
    95
    -  pure $ has_merge_objs && not only_shared_libs
    
    96
    -
    
    97 86
     targetRTSLinkerOnlySupportsSharedLibs :: Stage -> Action Bool
    
    98 87
     targetRTSLinkerOnlySupportsSharedLibs s =
    
    99 88
       queryTargetTarget s Toolchain.tgtRTSLinkerOnlySupportsSharedLibs
    

  • hadrian/src/Rules/Library.hs
    ... ... @@ -140,7 +140,7 @@ buildPackage root fp = do
    140 140
       ways <- interpretInContext ctx getLibraryWays
    
    141 141
       let hasVanilla = elem vanilla ways
    
    142 142
           hasDynamic = elem dynamic ways
    
    143
    -  support <- targetSupportsGhciObjects stage
    
    143
    +  support <- targetSupportsSharedLibs stage
    
    144 144
       when ((hasVanilla && hasDynamic) &&
    
    145 145
             support && way == vanilla) $ do
    
    146 146
         stamp <- (pkgStampFile (ctx { way = dynamic }))