-
Notifications
You must be signed in to change notification settings - Fork 711
Cabal: Disable GHCi libraries on Windows with GHC >=9.4 #8062
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
Conversation
As noted in GHC #21068, the lld linker used on Windows by GHC 9.4 and later does not support object merging. Consequently, --enable-library-for-ghci can no longer be supported on this platform.
c4cb368
to
927b8fe
Compare
This flag is needed for efficiency, but everything should still work, somehow. There seems to be no replacement for this speedup on Windows. |
We have concluded that we should disable this flag by default on Windows. |
By the way, this is the breakage that we previously encountered last time we tried to disable GHCi libraries: #1968 |
Let's remember to close #1968 before we merge this, rather than after. |
As of 9.4, GHC on Windows may produce .o files that are in fact archive files due to the lack of object merging support in the lld linker (see GHC #21068). Consequently, we must ensure that `ar` merges input archives' members, not add them as a single entry.
well maybe we could let it open, as disabling libraries for ghci in other os's would trigger the bug, but given the package is barely buildable with windows nowadays, i would merge it anyways |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, it would need a changelog entry mentioning the windows change but also the arDashLSupported
addition which does not seem rdirectly related with and affects all os's
No additional test needed for the windows change imo, no sure about the other one
Whoops, it looks like GitHub closed the MR as a result of my renaming the branch. I'll open a new MR addressing @jneira's comments shortly. |
As noted in GHC #21068, the lld linker used on Windows by GHC 9.4 and later does not support object merging. Consequently,
--enable-library-for-ghci
can no longer be supported on this platform.Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!