b0d2a5dd71f466e7d74fc8934f6f1ac6b8d36dd6
[sbcl.git] / src / cold / compile-cold-sbcl.lisp
1 ;;;; Compile the fundamental system sources (not CLOS, and possibly
2 ;;;; not some other warm-load-only stuff like DESCRIBE) to produce
3 ;;;; object files. Also set *TARGET-OBJECT-FILES* to all of their
4 ;;;; names.
5
6 ;;;; This software is part of the SBCL system. See the README file for
7 ;;;; more information.
8 ;;;;
9 ;;;; This software is derived from the CMU CL system, which was
10 ;;;; written at Carnegie Mellon University and released into the
11 ;;;; public domain. The software is in the public domain and is
12 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
13 ;;;; files for more information.
14
15 (in-package "SB-COLD")
16
17 (defvar *target-object-file-names*)
18
19 ;;; KLUDGE..
20 ;;;
21 ;;; CMU CL (as of 2.4.6 for Debian, anyway) issues warnings (and not just
22 ;;; STYLE-WARNINGs, either, alas) when it tries to interpret code containing
23 ;;; references to undefined functions. The most common problem is that
24 ;;; macroexpanded code refers to this function, which isn't defined until late.
25 ;;;
26 ;;; This
27 ;;;   #+cmu (defun sb!kernel::do-arg-count-error (&rest rest)
28 ;;;        (error "stub version of do-arg-count-error, rest=~S" rest))
29 ;;; doesn't work, with or without this
30 ;;;   (compile 'sb!kernel::do-arg-count-error))
31 ;;; so perhaps I should try
32 ;;;   (declaim (ftype ..) ..)
33 ;;; instead?
34 (declaim (ftype (function (&rest t) nil) sb!kernel::do-arg-count-error))
35
36 (let ((reversed-target-object-file-names nil))
37   (do-stems-and-flags (stem flags)
38     (unless (position :not-target flags)
39       (push (target-compile-stem stem
40                                  :assem-p (find :assem flags)
41                                  :ignore-failure-p (find :ignore-failure-p
42                                                          flags))
43             reversed-target-object-file-names)
44       #!+sb-show (warn-when-cl-snapshot-diff *cl-snapshot*)))
45   (setf *target-object-file-names*
46         (nreverse reversed-target-object-file-names)))