Christiaan suggested that I try cabal installing "--disable-library-vanilla" which I combined with --enable-shared. It almost works. It causes ghc to only create the dynamic libraries. However, ghc-pkg register fails with the error:
/usr/local/bin/ghc-pkg update - --global --user --package-db=dist/package.conf.inplace cabal: TestLib-0.1.0.0: cannot find libHSTestLib-0.1.0.0.a on library path (use --force to override) Failed to install TestLib-0.1.0.0 It seems that ghc-pkg thinks that we must have the .a files to register the package. (I scanned the ghc-pkg source and it looks like checkHSLib is where this check happens.) So, is the check in ghc-pkg really correct? I.e. the package would be unusable without the .a file? Or would this be OK, so we really should change ghc-pkg? -Andi On Fri, Oct 4, 2013 at 6:35 PM, Andreas Voellmy <[email protected]>wrote: > Hi all, > > Is it possible to have a Haskell package that only includes a dynamic > library and .dyn_hi files? I.e. it would omit the .o and .a files? I tried > building a library using cabal and --enable-shared. It still includes the > .o and .a files. > > Will builds with "-dynamic" and loading modules in ghci work correctly if > I just delete the .o and .a files? I did a few experiments and it seems to > work OK, although it seems that things break if I delete the .hi files, > even though I'd expect only the .dyn_hi files would be used. > > -Andi >
_______________________________________________ ghc-devs mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-devs
