about summary refs log tree commit diff
path: root/LICENSE
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2021-08-15T11·15+0200
committersterni <sternenseemann@systemli.org>2021-08-26T11·26+0000
commit2dd8bc7977aae7c5f545f8f61415f0bcfc30e02b (patch)
treedad113305fbe7e997fdf6760feac51e00de40962 /LICENSE
parenta0be4fd90272106856994301ff8d8e07f266bce6 (diff)
fix(nix/buildLisp): prevent image loader from parsing arguments r/2777
CCL and SBCL create executables by dumping their image. As a
consequence, some part of the respective compiler is embedded in the
resulting executable which is executed and loads the image. For CCL and
SBCL this piece of software seems to unconditionally parse arguments
which can't be prevented since it happens before any lisp is loaded.

Luckily in both cases the parsing stops at `--`, so we can just pass
this via the wrapper — we just need to work around the problem that this
will of course be left in argv and confuse any later code. This can be
rectified by deleting everything prior to the first `--` in the global
argument list on startup in both cases.

In cases we do want to pass arguments to the image loader, we can use
the special NIX_BUILDLISP_LISP_ARGS environment variable which is
understood by the wrapper.

Note: This fix doesn't interfere with ECL since it is not using the
wrapper script at the moment.

Fixes b/136.

Change-Id: I3f95aa61e945e51428021ca18232ff15c923f870
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3357
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions