You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if we could use the existing --staticlib ghc flag to trigger the uberjar, the description is somewhat applicable:
Generate a standalone static library (as opposed to an executable). This is useful when cross compiling. The library together with all its dependencies ends up in in a single static library that can be linked against.
getLinkFlags::DynFlags->LinkFlags
getLinkFlags dflags =uncurryLinkFlags$case ghcLink dflags ofLinkBinary-> (True, True)
LinkStaticLib-> (False, False)
LinkDynLib-> (True, False)
other ->
panic ("link: GHC not built to link this way: "++show other)
The first Bool says whether to generate a MANIFEST as well as a main class and the second Bool says whether to link in all the dependencies. As you can see, we're missing the (False, True) combination, and that's really what this issue amounts to - creating a new link flag that returns that pair and making sure that etlas will send that flag when the --enable-uberjar-mode flag is enabled on a library component.
See the discussions here: #396 (comment).
Should be a fairly easy task for a new contributor.
The text was updated successfully, but these errors were encountered: