[Haskell-cafe] Embedding the GHC API

Don Stewart dons at galois.com
Wed Oct 31 14:04:39 EDT 2007


I often use this in my cabal ghc-options:

    ghc-options: -funbox-strict-fields -O2 -fasm -Wall -optl-Wl,-s

the last runs ld's strip automatically.

mnislaih:
> Austin Seipp has written about this in his blog:
> 
> http://austin.youareinferior.net/?q=node/29
> 
> "I will take this time to point out that using the GHC API in your  
> applications results in *large* executables. The Interact example  
> above when compiled with vanilla --make options resulted in a whopping  
> 17mb executable. I've observed however you can mitigate this by an  
> enormous amount using the tools strip and gzexe, taking it down to a  
> light 2.5mb (a size reduction of about 85%)"
> 
> Cheers
> pepe
> 
> On 31/10/2007, at 9:44, Joel Reymont wrote:
> 
> >Has anyone tried to embed GHC as a library recently?
> >
> >What is the size of the resulting binary?
> >
> >I'm assuming a bare minimum of needed libraries.
> >
> >	Thanks, Joel
> >
> >--
> >http://wagerlabs.com
> >
> >
> >
> >
> >
> >_______________________________________________
> >Haskell-Cafe mailing list
> >Haskell-Cafe at haskell.org
> >http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list