Posted by derek_white
on March 31, 2008 at 3:18 PM PDT
This is a list of techniques for building a small squawk executable and suite, based on the current code base.
For the selection options that control the executable sizes, I've selected options based on the Mac x86 executable. We can extend this with data from other builds.
The main control levers for Squawk size are the builder properties listed in build.properties (which can be overridden using the -override: option), and builder command line options.
Standard Desktop Build
The default builder properties for desktop builds are in the build.properties file. The standard builder command line properties are:
d -prod -mac -o2 rom cldc imp debugger
The first 3 options control how the Squawk executable is built.
-prod means "production". This turns off c-level asserts and tracing code.
-mac means "macro". This generates the interpreter using macros instead of subroutines.
-o2 means "-o2".
rom is the actual builder command to execute. This command will create one or more suites, and compile the executable.
cldc, imp, and debugger are the modules that go into the bootstrap suite. To be a proper Java (TM) ME system, we need to support a configuration (cldc), and a profile (imp).
Standard SPOT Build
The SPOT build overrides three builder properties:
FLASH_MEMORY=true This property is heavily overloaded, but does things like disable support for files, sockets, enable bare-metal support, and use flash memory.
ENABLE_DYNAMIC_CLASSLOADING=false Although most of the code that translates java class files is part of the translator and romizer modules, there is a lot of support code that is part basic classes like Klass. By setting this property false, most of this code gets dead-method eliminated.
VERIFY_SIGNATURES=true Turn on code to verify that a suite's signature matches the suite. New option as of 3/31/08.
Message was edited by: derek_white