This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Command line arguments in compiled files?
- From: Per Bothner <per at bothner dot com>
- To: Jocelyn Paine <popx at ifs dot org dot uk>
- Cc: kawa at sources dot redhat dot com
- Date: Mon, 11 Nov 2002 11:26:15 -0800
- Subject: Re: Command line arguments in compiled files?
- References: <Pine.LNX.4.21.0211111701150.8694-100000@pop3.ifs.org.uk>
Jocelyn Paine wrote:
Just tried compiling this, using the --main flag:
(module-name 'Main)
(module-static #t)
(format #t "~A~%" command-line-arguments)
--main and --module-static are fundamentally incompatible,
at least as currently implemented/defined. Module-static
means that all the function *including* the main module
body are compiled to static code. More-over, the
main module body is part of <clinit>, the static initializer
code for the class. This is of course before --main
gets called.
It might make sense to redefined module-static with --main
to mean all functions, but not the top-level body. However,
it would mean re-doing various things, so it's not completely
trivial.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/