-
Notifications
You must be signed in to change notification settings - Fork 415
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
Fix native code generation of empty libraries on MSVC #2693
Conversation
Thanks! Looks good but we also need to modify |
Hmm - I can see the problem, but I'm not sure how to proceed. The list of modules in the library isn't determined at the point the |
This also needs a CHANGES entry |
We can always use |
MSVC doesn't support empty .lib files, so various places which depend on the .lib file for a .cmxa or which expect to generate altered to understand the difference. Signed-off-by: David Allsopp <[email protected]>
This only activates if the modules stanza is explicitly empty. Signed-off-by: David Allsopp <[email protected]>
Signed-off-by: David Allsopp <[email protected]>
This has been worked around in stdlib-shims, so it's no longer a blocker for Dune 1.11.4. The full solution will require refactoring the use of the The workaround for now is to remove the Note that the fix in stdlib-shims is constrained to < 4.10.0, so either this has to be fixed before OCaml 4.10 comes out, or the shim needs updating again. |
Signed-off-by: David Allsopp <[email protected]>
Signed-off-by: David Allsopp <[email protected]>
Signed-off-by: David Allsopp <[email protected]>
Re-created in #2829 |
Fixes #2687 (hopefully)
Discovered in the wild in ocaml/stdlib-shims#11 - the fact it affects stdlib-shims means the fix should probably go in 1.11 as well, and I've prepared a branch for that already (assuming this code is OK...)
This fixes the Dune side - in order to use these libraries, it's necessary to have ocaml/ocaml#9011, so empty libraries will be non-portable for OCaml < 4.10.
Given that this has only so far been seen with stdlib-shims (which is a special case), I'd go with Dune not trying to workaround this problem further.