[Git][ghc/ghc][wip/davide/hadrian_avoid_response_files_2] 2 commits: Update user guide putting response files in its own section
David Eichmann pushed to branch wip/davide/hadrian_avoid_response_files_2 at Glasgow Haskell Compiler / GHC Commits: e1b514df by David Eichmann at 2026-06-08T11:24:02+01:00 Update user guide putting response files in its own section - - - - - c5c7256f by David Eichmann at 2026-06-08T12:19:22+01:00 Add changelog on hadrian's use of response files - - - - - 2 changed files: - + changelog.d/hadrian-response-files.md - docs/users_guide/using.rst Changes: ===================================== changelog.d/hadrian-response-files.md ===================================== @@ -0,0 +1,15 @@ +section: packaging +synopsis: Improved Hadrian's use of response files +issues: #27230 +mrs: !15906 !16134 +description: + Response files are files that contain command-line arguments. Hadrian uses + response files to shorten command-line lengths. This is important on Windows + where command-line lengths are limited. + + Hadrian now supports response files when invoking GHC. In order to support + manually rerunning commands issued by Hadrian, response files are no longer + deleted. Instead they are stored under `_build/rsp`. Response files are now + only used when the corresponding command-line is too long for the host + platform. This greatly reduces the use of response files and avoids excessive + file usage. Response files are overwritten on subsequent Hadrian builds. ===================================== docs/users_guide/using.rst ===================================== @@ -85,17 +85,6 @@ all files; you cannot, for example, invoke ``ghc -c -O1 Foo.hs -O2 Bar.hs`` to apply different optimisation levels to the files ``Foo.hs`` and ``Bar.hs``. -In addition to passing arguments via the command-line, arguments can be passed -via GNU-style response files. For instance, - -.. code-block:: bash - - $ cat response-file - -O1 - Hello.hs - -o Hello - $ ghc @response-file - .. note:: .. index:: @@ -118,9 +107,24 @@ via GNU-style response files. For instance, ``-fspecialise`` will not be enabled, since the ``-fno-specialise`` overrides the ``-fspecialise`` implied by ``-O1``. + +Command-line arguments in response files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In addition to passing arguments via the command-line, arguments can be passed +via GNU-style response files. For instance, + +.. code-block:: bash + + $ cat response-file + -O1 + Hello.hs + -o Hello + $ ghc @response-file + .. _source-file-options: -Command line options in source files +Command-line options in source files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. index:: View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ea8b402afb2cc37f46aa16d84e2dadb... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ea8b402afb2cc37f46aa16d84e2dadb... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
David Eichmann (@DavidEichmann)