Constants crosscompiled now...

Stephen Weeks MLton@sourcelight.com
Wed, 3 Oct 2001 13:28:45 -0700


> I have now succeeded in crosscompiling the lookup-constants
> program to Windows and executing it there (attached FYI).
...

Sounds great.  We discussed the problem about host vs target constants here, and
think that the best way to go is to use a new syntax (_host_const) to identify
the few host constants (MLton_safe, MLton_detectOverflow, ...) and use a
different method from lookup-constants to get their value at compile time.  That
way, lookup-constants is only used for target constants, while host constants
can still be set on the command line (-safe, -detect-overflow, ...).

> When it links with -lmlton and -lgmp for the lookup-constants
> program, these libraries are apparently not used.

Remember that lookup-constants only uses the _prim's that are in the user
program or are needed from the basis library (after dead code elimination).  So,
for a particular program, even a self-compile, there are probably constants in
the basis library that are not computed by lookup-constants.  I'm not sure
offhand whether or not the -lmlton is necessary -- I'm just pointing out that it
is not correct to conclude that it is unnecessary from looking at one program.