-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The ghc-options are not passed to the linker #9589
Comments
Here is a reproducer:
Instead, you get
but nothing /something/silly! |
I cannot reproduce with cabal 3.10.2.1 and ghc 9.6.3 (on linux/x86_64).
|
@andreabedini however, what I'm concerned about is that I mean, for example, the invocation done after compiling the modules with |
You are right, I copied the wrong invocation
NOTE I had to do |
Any update on this issue? This is also causing problems for me where I need to pass an rpath directory to the linker when building a project that depends on the |
While fixing a bug that turned out to be another case of #7339, I realized that the
ghc-options
field is not being passed to a linker invocation ofghc
after having compiled the haskell modules and extra build sources (seebuildOrReplLib
).You can see that the linker options e.g. start from
mempty
instead ofbaseOpts
(wherebaseOpts
has already added toghcOptExtra
theghc-options
specified in the cabal file or flags). This happens forghcSharedOpts
, however, theghcOptExtra
seems to be added in that case. I haven't further diagnosed.The initial attempted fix (that turned out to be fixed by the patch that fixed #7339) was to add
which did not work because, even though it gets passed to the
ghc --make
invocation that compiles haskell modules, it does not get passed on to the linker invocation that links them together.The text was updated successfully, but these errors were encountered: