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

Commits:

1 changed file:

Changes:

  • hadrian/src/Settings/Builders/SplitSections.hs
    ... ... @@ -4,25 +4,26 @@ module Settings.Builders.SplitSections where
    4 4
     import Expression
    
    5 5
     import Packages
    
    6 6
     import Settings
    
    7
    +import Settings.Builders.Common
    
    7 8
     import Flavour.Type
    
    8 9
     
    
    9
    -import Oracles.Setting
    
    10 10
     
    
    11 11
     -- | Does it make sense to enable or disable split sections?
    
    12 12
     splitSectionsArgs :: Args
    
    13 13
     splitSectionsArgs = do
    
    14 14
       pkg <- getPackage
    
    15 15
       osx <- expr isOsxTarget
    
    16
    +  cross <- expr $ flag CrossCompiling
    
    16 17
       notSt0 <- notStage0
    
    17 18
       flav <- expr flavour
    
    18 19
       if ( ghcSplitSections flav
    
    19 20
              -- Flavour enables split-sections
    
    20 21
         && not osx
    
    21 22
              -- OS X doesn't support split sections
    
    22
    -    && notSt0
    
    23
    +    && (cross || notSt0)
    
    23 24
              -- Disable for stage 0 because we aren't going to ship
    
    24 25
              -- the resulting binaries and consequently there is no
    
    25
    -         -- reason to minimize size.
    
    26
    +         -- reason to minimize size. Unless cross compiling.
    
    26 27
         && (pkg /= ghc)
    
    27 28
              -- Disable section splitting for the GHC library.
    
    28 29
              -- It takes too long and there is little benefit.