Provide a better type for FORMAT NIL.
[sbcl.git] / make-target-2-load.lisp
blob44738efd2429ad1ce2088388ffd1dd7b53c9c0cd
1 ;;; Now that we use the compiler for macros, interpreted /SHOW doesn't
2 ;;; work until later in init.
3 #+sb-show (print "/hello, world!")
5 ;;; Do warm init without compiling files.
6 (defvar *compile-files-p* nil)
7 #+sb-show (print "/about to LOAD warm.lisp (with *compile-files-p* = NIL)")
8 (let ((*print-length* 10)
9 (*print-level* 5)
10 (*print-circle* t))
11 (load "src/cold/warm.lisp"))
13 ;;; Unintern no-longer-needed stuff before the possible PURIFY in
14 ;;; SAVE-LISP-AND-DIE.
15 #-sb-fluid (sb-impl::!unintern-init-only-stuff)
17 (sb-int:/show "done with warm.lisp, about to GC :FULL T")
18 (sb-ext:gc :full t)
20 ;;; resetting compilation policy to neutral values in preparation for
21 ;;; SAVE-LISP-AND-DIE as final SBCL core (not in warm.lisp because
22 ;;; SB-C::*POLICY* has file scope)
23 (sb-int:/show "setting compilation policy to neutral values")
24 (proclaim
25 '(optimize
26 (compilation-speed 1) (debug 1) (inhibit-warnings 1)
27 (safety 1) (space 1) (speed 1)))
29 ;;; Lock internal packages
30 #+sb-package-locks
31 (dolist (p (list-all-packages))
32 (unless (member p (mapcar #'find-package '("KEYWORD" "CL-USER")))
33 (sb-ext:lock-package p)))
35 (sb-int:/show "done with warm.lisp, about to SAVE-LISP-AND-DIE")
36 ;;; Even if /SHOW output was wanted during build, it's probably
37 ;;; not wanted by default after build is complete. (And if it's
38 ;;; wanted, it can easily be turned back on.)
39 #+sb-show (setf sb-int:*/show* nil)
40 ;;; The system is complete now, all standard functions are
41 ;;; defined.
42 ;;; The call to CTYPE-OF-CACHE-CLEAR is probably redundant.
43 ;;; SAVE-LISP-AND-DIE calls DEINIT which calls DROP-ALL-HASH-CACHES.
44 (sb-kernel::ctype-of-cache-clear)
45 (setq sb-c::*flame-on-necessarily-undefined-thing* t)
47 ;;; Clean up stray symbols from the CL-USER package.
48 (with-package-iterator (iter "CL-USER" :internal :external)
49 (loop (multiple-value-bind (winp symbol) (iter)
50 (if winp (unintern symbol "CL-USER") (return)))))
52 (sb-ext:save-lisp-and-die "output/sbcl.core")