Constants crosscompiled now...

Anoq of the Sun anoq@HardcoreProcessing.com
Wed, 03 Oct 2001 23:28:55 +0200



Stephen Weeks wrote:
> 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, ...).

I think I will prefer leaving this part to you :)

One question though - if I compile apps without setting any of the
-safe or detect-overflow flags, will the flags then be the same
as when MLton compiles itself? Because then I guess it should work
as expected for now for my apps...

> 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.

Oh, OK :) But I'm not planning on removing them either - but I'm
glad that the constants file for MLton itself does not require these
to, so that we avoid the hen and egg problem with crosscompiling
those libs.


Cheers
-- 
http://www.HardcoreProcessing.com