Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

bgamari
Copy link
Contributor

@bgamari bgamari commented Mar 24, 2022

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!

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.
@bgamari bgamari force-pushed the disable-ghci-libs-on-windows branch from c4cb368 to 927b8fe Compare March 24, 2022 14:16
@Mikolaj
Copy link
Member

Mikolaj commented Mar 24, 2022

This flag is needed for efficiency, but everything should still work, somehow. There seems to be no replacement for this speedup on Windows.

@bgamari
Copy link
Contributor Author

bgamari commented Mar 24, 2022

We have concluded that we should disable this flag by default on Windows.

@bgamari
Copy link
Contributor Author

bgamari commented Mar 24, 2022

By the way, this is the breakage that we previously encountered last time we tried to disable GHCi libraries: #1968

@Mikolaj
Copy link
Member

Mikolaj commented Mar 24, 2022

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.
@jneira
Copy link
Member

jneira commented Mar 28, 2022

Let's remember to close #1968 before we merge this, rather than after.

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

Copy link
Member

@jneira jneira left a 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

@bgamari bgamari closed this Mar 28, 2022
@bgamari bgamari deleted the disable-ghci-libs-on-windows branch March 28, 2022 21:43
@bgamari
Copy link
Contributor Author

bgamari commented Mar 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants