Restore build on non-x86oids.
[sbcl.git] / make-target-2-load.lisp
blobb90af221f3b95fe5fbe0c8c9fa961febbb1c41c8
1 ;;; Do warm init without compiling files.
2 (defvar *compile-files-p* nil)
3 "about to LOAD warm.lisp (with *compile-files-p* = NIL)"
4 (let ((*print-length* 10)
5 (*print-level* 5)
6 (*print-circle* t))
7 (load "src/cold/warm.lisp"))
9 ;;; Test that BUILD-INST-SPACE will work - there are assertions
10 ;;; in there about correctness of all instructions' operands.
11 (progn
12 (sb-disassem::get-inst-space :force t)
13 ;; Saving the memoized result is a waste of memory.
14 (setq sb-disassem::*disassem-inst-space* nil))
16 ;;; Unintern no-longer-needed stuff before the possible PURIFY in
17 ;;; SAVE-LISP-AND-DIE.
18 #-sb-fluid (sb-impl::!unintern-init-only-stuff)
20 "done with warm.lisp, about to GC :FULL T"
21 (sb-ext:gc :full t)
23 ;;; resetting compilation policy to neutral values in preparation for
24 ;;; SAVE-LISP-AND-DIE as final SBCL core (not in warm.lisp because
25 ;;; SB-C::*POLICY* has file scope)
26 (setq sb-c::*policy* (copy-structure sb-c::**baseline-policy**))
28 ;;; Lock internal packages
29 #+sb-package-locks
30 (dolist (p (list-all-packages))
31 (unless (member p (mapcar #'find-package '("KEYWORD" "CL-USER")))
32 (sb-ext:lock-package p)))
34 "done with warm.lisp, about to SAVE-LISP-AND-DIE"
35 ;;; Even if /SHOW output was wanted during build, it's probably
36 ;;; not wanted by default after build is complete. (And if it's
37 ;;; wanted, it can easily be turned back on.)
38 #+sb-show (setf sb-int:*/show* nil)
39 ;;; The system is complete now, all standard functions are
40 ;;; defined.
41 ;;; The call to CTYPE-OF-CACHE-CLEAR is probably redundant.
42 ;;; SAVE-LISP-AND-DIE calls DEINIT which calls DROP-ALL-HASH-CACHES.
43 (sb-kernel::ctype-of-cache-clear)
44 (setq sb-c::*flame-on-necessarily-undefined-thing* t)
46 ;;; Clean up stray symbols from the CL-USER package.
47 (with-package-iterator (iter "CL-USER" :internal :external)
48 (loop (multiple-value-bind (winp symbol) (iter)
49 (if winp (unintern symbol "CL-USER") (return)))))
51 #+sb-fasteval (setq sb-ext:*evaluator-mode* :interpret)
52 (sb-ext:save-lisp-and-die "output/sbcl.core")