diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-08-12 13:50:30 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-10-01 18:16:22 +0100 |
commit | 813e95d3477e16b1537f8941d4e007b2339c4da4 (patch) | |
tree | f7912a4213b2406adeed6e33335342a7e2ab9830 /docs/users_guide/phases.rst | |
parent | 45dbb86ed14d3c317837552b1fa1836ba2fe6cde (diff) | |
download | haskell-wip/ghc-fat-interface.tar.gz |
Teach -fno-code about -fprefer-byte-codewip/ghc-fat-interface
This patch teachs the code generation logic of -fno-code about
-fprefer-byte-code, so that if we need to generate code for a module
which prefers byte code, then we generate byte code rather than object
code.
We keep track separately which modules need object code and which byte
code and then enable the relevant code generation for each. Typically
the option will be enabled globally so one of these sets should be empty
and we will just turn on byte code or object code generation.
We also fix the bug where we would generate code for a module which
enables Template Haskell despite the fact it was unecessary.
Fixes #22016
Diffstat (limited to 'docs/users_guide/phases.rst')
-rw-r--r-- | docs/users_guide/phases.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst index be3ca70bf8..3a1996bc20 100644 --- a/docs/users_guide/phases.rst +++ b/docs/users_guide/phases.rst @@ -625,6 +625,11 @@ Options affecting code generation Omit code generation (and all later phases) altogether. This is useful if you're only interested in type checking code. + If a module contains a Template Haskell splice then in ``--make`` mode, code + generation will be automatically turned on for all dependencies. By default + object files are generated but if ghc-flag:`-fprefer-byte-code` is enable then + byte-code will be generated instead. + .. ghc-flag:: -fwrite-interface :shortdesc: Always write interface files :type: dynamic |