-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10350 from haskell/mergify/bp/3.12/pr-8717
Always pass `ghc-options` (backport #8717)
- Loading branch information
Showing
3 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
synopsis: Always pass `ghc-options` to GHC | ||
packages: Cabal | ||
prs: #8717 | ||
issues: | ||
|
||
description: { | ||
|
||
Previously, options set in the package field `ghc-options` would not be passed | ||
to GHC during the link phase for shared objects (where multiple `.o` or | ||
`.dyn_o` files are merged into a single object file). This made it impossible | ||
to use `ghc-options` to use a different linker by setting (for example) | ||
`ghc-options: -optl-fuse-ld=mold -optlm-fuse-ld=mold`; the options would be | ||
dropped in the link phase, falling back to the default linker. | ||
|
||
It was possible to work around this by duplicating the `ghc-options` to | ||
`ghc-shared-options`, which _are_ passed in the shared link phase, but that had | ||
the (undocumented and unfortunate) side-effect of disabling the GHC | ||
`-dynamic-too` flag, effectively doubling compilation times when | ||
`ghc-shared-options` are set. | ||
|
||
Now, `ghc-options` are combined with `ghc-shared-options` (to accurately | ||
reflect the documentation on this feature) and the fact that | ||
`ghc-shared-options` disables `-dynamic-too` is documented. | ||
|
||
} |