diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-08-01 11:34:32 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-08-05 04:00:39 -0400 |
commit | 53ce0db5a06598c88c6b8cb32043b878e7083dd4 (patch) | |
tree | 281c045c9f198c5bb046780881931b41de1f15d4 /docs | |
parent | 2bff2f87e43985e02bdde8c6fa39279df86cb617 (diff) | |
download | haskell-53ce0db5a06598c88c6b8cb32043b878e7083dd4.tar.gz |
Refactor handling of object merging
Previously to merge a set of object files we would invoke the linker as
usual, adding -r to the command-line. However, this can result in
non-sensical command-lines which causes lld to balk (#17962).
To avoid this we introduce a new tool setting into GHC, -pgmlm, which is
the linker which we use to merge object files.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/phases.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst index af65d613aa..3c94a39733 100644 --- a/docs/users_guide/phases.rst +++ b/docs/users_guide/phases.rst @@ -73,6 +73,14 @@ given compilation phase: Use ⟨cmd⟩ as the linker. +.. ghc-flag:: -pgmlm ⟨cmd⟩ + :shortdesc: Use ⟨cmd⟩ as the linker when merging object files + :type: dynamic + :category: phase-programs + + Use ⟨cmd⟩ as the linker when merging object files (e.g. when generating + joined objects for loading into GHCi). + .. ghc-flag:: -pgmdll ⟨cmd⟩ :shortdesc: Use ⟨cmd⟩ as the DLL generator :type: dynamic @@ -189,6 +197,14 @@ the following flags: Pass ⟨option⟩ to the linker. +.. ghc-flag:: -optlm ⟨option⟩ + :shortdesc: pass ⟨option⟩ to the linker when merging object files. + :type: dynamic + :category: phase-options + + Pass ⟨option⟩ to the linker when merging object files. In the case of a + standard ``ld``-style linker this should generally include the ``-r`` flag. + .. ghc-flag:: -optdll ⟨option⟩ :shortdesc: pass ⟨option⟩ to the DLL generator :type: dynamic |