WAIT-ON-SEMAPHORE could block indefinitely despite :TIMEOUT being supplied
[sbcl.git] / make-target-2-load.lisp
blob48d38ac7ec07a2b359aa758637a16ff7484f258a
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 ;;; Unintern no-longer-needed stuff before the possible PURIFY in
10 ;;; SAVE-LISP-AND-DIE.
11 #-sb-fluid (sb-impl::!unintern-init-only-stuff)
13 "done with warm.lisp, about to GC :FULL T"
14 (sb-ext:gc :full t)
16 ;;; resetting compilation policy to neutral values in preparation for
17 ;;; SAVE-LISP-AND-DIE as final SBCL core (not in warm.lisp because
18 ;;; SB-C::*POLICY* has file scope)
19 (setq sb-c::*policy* (copy-structure sb-c::**baseline-policy**))
21 ;;; Lock internal packages
22 #+sb-package-locks
23 (dolist (p (list-all-packages))
24 (unless (member p (mapcar #'find-package '("KEYWORD" "CL-USER")))
25 (sb-ext:lock-package p)))
27 "done with warm.lisp, about to SAVE-LISP-AND-DIE"
28 ;;; Even if /SHOW output was wanted during build, it's probably
29 ;;; not wanted by default after build is complete. (And if it's
30 ;;; wanted, it can easily be turned back on.)
31 #+sb-show (setf sb-int:*/show* nil)
32 ;;; The system is complete now, all standard functions are
33 ;;; defined.
34 ;;; The call to CTYPE-OF-CACHE-CLEAR is probably redundant.
35 ;;; SAVE-LISP-AND-DIE calls DEINIT which calls DROP-ALL-HASH-CACHES.
36 (sb-kernel::ctype-of-cache-clear)
37 (setq sb-c::*flame-on-necessarily-undefined-thing* t)
39 ;;; Clean up stray symbols from the CL-USER package.
40 (with-package-iterator (iter "CL-USER" :internal :external)
41 (loop (multiple-value-bind (winp symbol) (iter)
42 (if winp (unintern symbol "CL-USER") (return)))))
44 #+sb-fasteval (setq sb-ext:*evaluator-mode* :interpret)
45 (sb-ext:save-lisp-and-die "output/sbcl.core")