Re: -staticlib flag for building standalone static libraries producing very large libraries

2015-03-07 Thread Yuras Shumovich
On Sat, 2015-03-07 at 22:18 +1100, Sean Seefried wrote:
 Hi all,
 
 Can anyone explain the following problem I'm having?
 
 I'm currently writing a game in Haskell. When I produce a plain old
 executable (for local testing) it's about 23M. However, when I create a
 static lib using the -staticlib flag it is 54M.

Most likely that is because executable contains only necessary/used
definitions, while static lib is just an archive of all object files,
including all dependencies.

Note also that by default core libs are compiled using --split-objs, so
when linking executable, all unused top level definitions are filtered
out. (And you can decrease size of the executable even more by compiling
it and all its dependencies using --split-objs if you are not using it
already.) Without the flag, unused definitions are filtered out on per
module basis.

(I'm not an expert here, so the above description can be partially or
totally wrong :) )

Thanks,
Yuras

 
 Why the discrepancy?
 
 Sean
 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users


-staticlib flag for building standalone static libraries producing very large libraries

2015-03-07 Thread Sean Seefried
Hi all,

Can anyone explain the following problem I'm having?

I'm currently writing a game in Haskell. When I produce a plain old
executable (for local testing) it's about 23M. However, when I create a
static lib using the -staticlib flag it is 54M.

Why the discrepancy?

Sean
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users