summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-01-22 08:11:02 -0500
committerBen Gamari <ben@smart-cactus.org>2023-01-25 22:49:21 -0500
commit955aa684e5ffb0eeca10d1e51befa9378b511222 (patch)
tree04ae1fefe4c6435771c8b06162ef146a8b16e953 /docs
parentbc038c3bd45ee99db9fba23a823a906735740200 (diff)
downloadhaskell-wip/T21972.tar.gz
nativeGen: Disable asm-shortcutting on Darwinwip/T21972
Asm-shortcutting may produce relative references to symbols defined in other compilation units. This is not something that MachO relocations support (see #21972). For this reason we disable the optimisation on Darwin. We do so without a warning since this flag is enabled by `-O2`. Another way to address this issue would be to rather implement a PLT-relocatable jump-table strategy. However, this would only benefit Darwin and does not seem worth the effort. Closes #21972.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/using-optimisation.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index d3ca68a1df..df87fdb6a3 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -262,8 +262,10 @@ by saying ``-fno-wombat``.
of a unconditionally jump, we replace all jumps to A by jumps to the successor
of A.
- This is mostly done during Cmm passes. However this can miss corner cases. So at -O2
- we run the pass again at the asm stage to catch these.
+ This is mostly done during Cmm passes. However this can miss corner cases.
+ So at ``-O2`` this flag runs the pass again at the assembly stage to catch
+ these. Note that due to platform limitations (:ghc-ticket:`21972`) this flag
+ does nothing on macOS.
.. ghc-flag:: -fblock-layout-cfg
:shortdesc: Use the new cfg based block layout algorithm.