[plt-scheme] huge executables

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Mar 22 07:46:52 EST 2006

At Sun, 19 Mar 2006 15:32:58 +0300, Буланов Иван Сергеевич wrote:
> I have plt-299.400-bin-i386-win32 installed on my WinXP system with MSVC 2003 
> compiler.
> When compiled with "gmzc --gui-exe little-program.exe little-program.scm" it 
> produces executable of 2.5Mbytes.
> [...]
> Thus, is it possible to link to standard Scheme libraries statically without 
> including of huge amount of byte-code?
> Is it possible to link to native-code-compiled libraries?
> Or is there any way of restricting compiler`s include path to only those 
> modules, that are realy needed?

Although "--gui-exe" includes only modules that are transitively
referenced from your program module, the "mred.ss" module references a
lot of other modules. Of course, the content of those modules is mostly
dead code in your application.

We had the same problem for the ICFP 2005 programming contest BDK. I
wrote a program to strip dead code from the modules (including all
macros and compile-time code), and this made the executables much
smaller. I plan to clean up the tool and merge it into mzc sometime
soon.

Meanwhile, I don't have a ready solution to your problem.

Matthew



Posted on the users mailing list.