From: Axel S. <A....@ke...> - 2005-03-01 09:17:22
|
On Mon, 2005-02-28 at 14:20 -0800, John Velman wrote: > I suppose this is related to the lack of dynamic linking in GHC in Linux > (if I read the GHC manual correctly), but I was shocked when I finally > compiled my small program and got an 7.6 megabyte executable. I then > checked the demo helloworld and found a 7.3 MB executable. Is there a way > to get smaller executables (if I understood GHC better)? 7? Mine is about 4. You can strip off debugging information (which is useless for Haskell programs anyway), i.e.: ~/source/gtk2hs/demo/hello:$ ls -l helloWorld -rwxr-xr-x 1 as49 as49 4612011 Sep 1 15:28 helloWorld ~/source/gtk2hs/demo/hello:$ strip helloWorld ~/source/gtk2hs/demo/hello:$ ls -l helloWorld -rwxr-xr-x 1 as49 as49 1911340 Mar 1 09:10 helloWorld I'm afraid that's all you can do right now. We could split the library into smaller pieces but the inconvenience is probably not worth the benefit for most users. Axel. |