[Git][ghc/ghc][wip/mp/14996] Use response file for invoking ghc
Matthew Pickering pushed to branch wip/mp/14996 at Glasgow Haskell Compiler / GHC Commits: 01262c01 by Matthew Pickering at 2025-11-07T16:48:55+00:00 Use response file for invoking ghc - - - - - 1 changed file: - hadrian/src/Builder.hs Changes: ===================================== hadrian/src/Builder.hs ===================================== @@ -352,6 +352,9 @@ instance H.Builder Builder where Haddock BuildPackage -> runHaddock path buildArgs buildInputs + Ghc FindHsDependencies _ -> do + runGhcWithResponse path buildArgs buildInputs + HsCpp -> captureStdout Make dir -> cmd' buildOptions path ["-C", dir] buildArgs @@ -394,6 +397,13 @@ runHaddock haddockPath flagArgs fileInputs = withTempFile $ \tmp -> do writeFile' tmp $ escapeArgs fileInputs cmd [haddockPath] flagArgs ('@' : tmp) +runGhcWithResponse :: FilePath -> [String] -> [FilePath] -> Action () +runGhcWithResponse ghcPath flagArgs fileInputs = withTempFile $ \tmp -> do + writeFile' tmp $ escapeArgs (fileInputs) + + cmd [ghcPath] flagArgs ('@' : tmp) + + -- TODO: Some builders are required only on certain platforms. For example, -- 'Objdump' is only required on OpenBSD and AIX. Add support for platform -- specific optional builders as soon as we can reliably test this feature. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/01262c019aefc67ead69fc2b7bd8344a... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/01262c019aefc67ead69fc2b7bd8344a... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Matthew Pickering (@mpickering)