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

Commits:

2 changed files:

Changes:

  • hadrian/src/Builder.hs
    ... ... @@ -361,6 +361,12 @@ instance H.Builder Builder where
    361 361
     
    
    362 362
                     Haddock BuildPackage -> runHaddock path buildArgs buildInputs
    
    363 363
     
    
    364
    +                Ghc FindHsDependencies _ -> do
    
    365
    +                  -- Use a response file for ghc -M invocations, to
    
    366
    +                  -- avoid issues with command line size limit on
    
    367
    +                  -- Windows (#26637)
    
    368
    +                  runGhcWithResponse path buildArgs buildInputs
    
    369
    +
    
    364 370
                     HsCpp    -> captureStdout
    
    365 371
     
    
    366 372
                     Make dir -> cmd' buildOptions path ["-C", dir] buildArgs
    
    ... ... @@ -403,6 +409,17 @@ runHaddock haddockPath flagArgs fileInputs = withTempFile $ \tmp -> do
    403 409
         writeFile' tmp $ escapeArgs fileInputs
    
    404 410
         cmd [haddockPath] flagArgs ('@' : tmp)
    
    405 411
     
    
    412
    +runGhcWithResponse :: FilePath -> [String] -> [FilePath] -> Action ()
    
    413
    +runGhcWithResponse ghcPath flagArgs fileInputs = withTempFile $ \tmp -> do
    
    414
    +
    
    415
    +    writeFile' tmp $ escapeArgs fileInputs
    
    416
    +
    
    417
    +    -- We can't put the flags in a response file, because some flags
    
    418
    +    -- require empty arguments (such as the -dep-suffix flag), but
    
    419
    +    -- that isn't supported yet due to #26560.
    
    420
    +    cmd [ghcPath] flagArgs ('@' : tmp)
    
    421
    +
    
    422
    +
    
    406 423
     -- TODO: Some builders are required only on certain platforms. For example,
    
    407 424
     -- 'Objdump' is only required on OpenBSD and AIX. Add support for platform
    
    408 425
     -- specific optional builders as soon as we can reliably test this feature.
    

  • hadrian/src/Settings/Builders/Ghc.hs
    ... ... @@ -182,7 +182,7 @@ findHsDependencies = builder (Ghc FindHsDependencies) ? do
    182 182
                 , arg "-include-pkg-deps"
    
    183 183
                 , arg "-dep-makefile", arg =<< getOutput
    
    184 184
                 , pure $ concat [ ["-dep-suffix", wayPrefix w] | w <- Set.toList ways ]
    
    185
    -            , getInputs ]
    
    185
    +            ]
    
    186 186
     
    
    187 187
     haddockGhcArgs :: Args
    
    188 188
     haddockGhcArgs = mconcat [ commonGhcArgs