-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathimagesave.lisp
23 lines (23 loc) · 1.13 KB
/
imagesave.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;; Fancy save steps
(defun save-and-exit (name &key toplevel save-runtime-options verbose
precompile-generics executable)
"Saves the current Lisp image and dies.
Arguments:
NAME - the file name to save the image.
TOPLEVEL - the name of the toplevel function.
SAVE-RUNTIME-OPTIONS - indicates if the runtime options shall be saved to the C runtime.
This is usually permanent.
VERBOSE - if true, the output streams are not muted before dumping the image.
PRECOMPILE-GENERICS - will precompile the generic functions before saving.
EXECUTABLE - Whether to combine the launcher with the image to create an executable."
(unintern 'save-and-exit)
(disable-debugger)
(when precompile-generics
(bazel.sbcl::precompile-generic-functions :verbose bazel.log:*verbose*))
(unless verbose (bazel.sbcl:mute-output-streams))
(fold-identical-code :aggressive t)
(setf (extern-alien "gc_coalesce_string_literals" char) 2)
(save-lisp-and-die name :executable executable
:toplevel toplevel
:save-runtime-options save-runtime-options)
(sb-int:bug "Unreachable"))