Matthew Pickering pushed to branch wip/mp/14996 at Glasgow Haskell Compiler / GHC
Commits:
-
f969aa91
by Matthew Pickering at 2025-11-07T16:24:52+00:00
1 changed file:
Changes:
| ... | ... | @@ -352,6 +352,8 @@ instance H.Builder Builder where |
| 352 | 352 | |
| 353 | 353 | Haddock BuildPackage -> runHaddock path buildArgs buildInputs
|
| 354 | 354 | |
| 355 | + Ghc {} -> runGhc path buildArgs buildInputs
|
|
| 356 | + |
|
| 355 | 357 | HsCpp -> captureStdout
|
| 356 | 358 | |
| 357 | 359 | Make dir -> cmd' buildOptions path ["-C", dir] buildArgs
|
| ... | ... | @@ -394,6 +396,12 @@ runHaddock haddockPath flagArgs fileInputs = withTempFile $ \tmp -> do |
| 394 | 396 | writeFile' tmp $ escapeArgs fileInputs
|
| 395 | 397 | cmd [haddockPath] flagArgs ('@' : tmp)
|
| 396 | 398 | |
| 399 | +runGhc :: FilePath -> [String] -> [FilePath] -> Action ()
|
|
| 400 | +runGhc ghcPath flagArgs fileInputs = withTempFile $ \tmp -> do
|
|
| 401 | + writeFile' tmp $ escapeArgs fileInputs
|
|
| 402 | + cmd [ghcPath] flagArgs ('@' : tmp)
|
|
| 403 | + |
|
| 404 | + |
|
| 397 | 405 | -- TODO: Some builders are required only on certain platforms. For example,
|
| 398 | 406 | -- 'Objdump' is only required on OpenBSD and AIX. Add support for platform
|
| 399 | 407 | -- specific optional builders as soon as we can reliably test this feature.
|