Reducing the executable output filesize with GHC (on Windows)

I remember having read how to do this a while ago, but I can't google it back. How can I force the linker to exclude all the sections that are not referenced? I thought it had to do something with -split-objs? I've written a short consolemode program, but it compiles to 1.3MB. Since I will be creating a lot of these small apps, surely this filesize can be reduced? Thanks, Peter PS: The program I wrote is 250 lines of code. It is a simple vectormath exercise generator for my students which I wrote in 5 hours, something I would never been able to do in C++/C#, even though I have much more experience in the latter languages. Haskell's sooo nice, and I'm just scratching the surface of it. Thank to all of you guys for the hard work J

Hello Peter, Sunday, December 23, 2007, 1:12:05 AM, you wrote:
How can I force the linker to exclude all the sections that are not referenced?
ghc ... -optl -s
I thought it had to do something with -split-objs?
no, it's just `strip`
I▓ve written a short consolemode program, but it compiles to 1.3MB.
you can use upx --lzma to further decrease EXE size -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
participants (2)
-
Bulat Ziganshin
-
Peter Verswyvelen