summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-08-12 13:50:30 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-10-11 12:48:45 -0400
commit9789ea8e9f35d5c0674e10730c3435c4d3293f2b (patch)
treeabed1631f47a64b4dd52a2d216b7b28d18d4cc45 /docs
parente058b138fef9f697095f97cb6a52f6ba58c940c5 (diff)
downloadhaskell-9789ea8e9f35d5c0674e10730c3435c4d3293f2b.tar.gz
Teach -fno-code about -fprefer-byte-code
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')
-rw-r--r--docs/users_guide/phases.rst5
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