As you might expect, the problem in that situation lies in the way the
different Lisp implementations treat their own command-line. Guess what,
it’s a mess. When you dump an executable as described previsouly, the
cmdline
function will always contain user options only. When you
use Clon
in a script, there may be a mix of vendor-specific options
with application ones, in which case the situation is as follows.
SBCL processes its own options and leaves the others unprocessed on the
command-line. This means that as long as there is no overlap between
SBCL’s options and yours, you can just put them all together on the
command-line. In case of overlap however, you need to separate SBCL’s
options from yours with a call to --end-toplevel-options
(that’s
an SBCL specific option separator).
CMUCL processes its own options, issues a warning about the options it
doesn’t know about, but in any case, it eats the whole command-line.
Consequently, if you want to provide options to your application, you
need to put them after a --
separator. Note that you can still
use a second such separator to provide Clon
with both some options
and a remainder (see Option Separator in The Clon End-User Manual).
CCL, ECL, and CLISP all process their own options but will abort on
unknown ones. Consequently, if you want to provide options to your
application, you need to put them after a --
separator. Note that
you can still use a second such separator to provide Clon
with both
some options and a remainder (see Option Separator in The Clon End-User Manual).
ABCL processes its own options and leaves the others unprocessed on the
command-line. This means that as long as there is no overlap between
ABCL’s options and yours, you can just put them all together on the
command-line. In case of overlap however, you need to separate ABCL’s
options from yours with a --
separator. Note that you can still
use a second such separator to provide Clon
with both some options
and a remainder (see Option Separator in The Clon End-User Manual).
Allegro processes its own options, issues only a warning about options
it doesn’t know of, and leaves anything after a --
alone.
Consequently, if you want to provide options to your application, you
need to put them after a --
separator. Note that you can still
use a second such separator to provide Clon
with both some options
and a remainder (see Option Separator in The Clon End-User Manual).
LispWorks processes its own options and ignores the other ones, but
always leaves everything on the command-line. It does not currently
support --
as an option separator either. Consequently, if you
want to provide options to your application, you need to put them after
a --
separator, although you will get into trouble if any
option there is recognized by LispWorks itself. Note that you can still
use a second such separator to provide Clon
with both some options
and a remainder (see Option Separator in The Clon End-User Manual).