Enable getaddrinfo on x86-64 macOS.
[sbcl.git] / build-order.lisp-expr
blobe2aae64ec9afed71e4a511fd7bb0e63ba60ce71f
1 ;;;; -*- Lisp -*-
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
12 ;;; a linear ordering of system sources which works both to
13 ;;; compile/load the cross-compiler under the host Common Lisp and
14 ;;; then to cross-compile the complete system into the
15 ;;; under-construction target SBCL
16 ;;;
17 ;;; The keyword flags (:NOT-HOST, :NOT-TARGET, :ASSEM...) are
18 ;;; documented in the code which implements their effects. (As of
19 ;;; sbcl-0.7.10, the comments are on DEFPARAMETER *EXPECTED-STEM-FLAGS*
20 ;;; in src/cold/shared.lisp.)
21 ;;;
22 ;;; Of course, it'd be very nice to have this be a dependency DAG
23 ;;; instead, so that we could do automated incremental recompilation.
24 ;;; But the dependencies are varied and subtle, and it'd be extremely
25 ;;; difficult to extract them automatically, and it'd be extremely
26 ;;; tedious and error-prone to extract them manually, so we don't
27 ;;; extract them. (It would be nice to fix this someday. The most
28 ;;; feasible approach that I can think of would be to make the
29 ;;; dependencies work on a package level, not an individual file
30 ;;; level. Doing it at the package level would make the granularity
31 ;;; coarse enough that it would probably be pretty easy to maintain
32 ;;; the dependency information manually, and the brittleness of the
33 ;;; package system would help make most violations of the declared
34 ;;; dependencies obvious at build time. -- WHN 20000803
36 #-warm-build-phase
38  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
39  ;;; miscellaneous
40  ;; This comes as early as possible, so that we catch the source locations
41  ;; for everything.
42  ("src/code/early-source-location" :c-headers)
43  ("src/code/cross-early" :c-headers :not-target)
45  ;; This comes early because it's useful for debugging everywhere.
46  ("src/code/show" :c-headers)
47  ("src/compiler/early-constantp" :c-headers)
48  ("src/code/defsetfs" :not-host)
50  ;; Declare all target special variables defined by ANSI
51  ("src/code/cl-specials" :not-host)
53  ;; Things like DX-FLET and AWHEN are available for use in both the host
54  ;; and target very early, with no DEF! obfuscation necessary.
55  ("src/code/primordial-extensions" :c-headers)
56  ("src/code/cold-init-helper-macros" :c-headers)
57  ("src/code/early-defmethod" :not-host)
59  ;; ASAP we replace the host's backquote reader with our own, to avoid leaking
60  ;; details of the host into the target. This is not a concern in make-host-2
61  ;; becase IN-TARGET-CROSS-COMPILATION-MODE assigns the reader macros before
62  ;; compiling anything. It is, however, a minor concern for make-host-1, but
63  ;; usually a problem can be exposed only by contrived code / poor style.
64  ;; e.g. if the host's reader were used when compiling
65  ;;  (EVAL-WHEN (#-SB-XC :COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
66  ;;    (DEFUN A-MACRO-HELPER () '`(FOO ,A ,B))
67  ;; then A-MACRO-HELPER returns host code, and calling it might be wrong, either
68  ;; obviously or subtly. If the result is (LIST* 'FOO (LIST* A (LIST B)))
69  ;; then it's subtly wrong because it might not be the optimal strategy;
70  ;; whereas if it's (BACKQUOTE (FOO (UNQUOTE A) (UNQUOTE B))) then it's
71  ;; flat out wrong. At any rate, judicious avoidance of EVAL-WHEN and nested
72  ;; quasiquotation in 'primordial-extensions' prevents any such issues.
73  ("src/code/backq")
75  ;; It's difficult to be too early with a DECLAIM SPECIAL (or DEFVAR
76  ;; or whatever) thanks to the sullenly-do-the-wrong-thing semantics
77  ;; of CL special binding when the variable is undeclared.
78  ("src/code/globals" :not-host)
80  ("src/code/cmacros" :not-host)
82  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
83  ;;; cross-compiler-only replacements for stuff which in target Lisp would be
84  ;;; supplied by basic machinery
86  ("src/code/cross-byte"  :c-headers :not-target)
87  ("src/code/cross-misc"  :c-headers :not-target)
88  ("src/code/cross-char"  :c-headers :not-target)
89  ("src/code/cross-float" :not-target)
90  ("src/code/cross-io"    :not-target)
91  ("src/code/cross-thread" :c-headers :not-target)
92  ("src/code/cross-condition" :not-target)
94  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
95  ;;; stuff needed early both in cross-compilation host and in target Lisp
97  ("src/code/uncross" :c-headers)
99  ("src/code/defbangtype" :c-headers)
100  ("src/code/early-constants" :c-headers)
102  ("src/compiler/deftype" :c-headers)     ; on host for SB!XC:DEFTYPE
103  ("src/compiler/early-lexenv" :c-headers)
104  ("src/compiler/early-globaldb" :c-headers)
106  ;; comes early so that stuff can reason about function names
107  ("src/code/function-names" :c-headers)
109  ;; for various constants e.g. SB!XC:MOST-POSITIVE-FIXNUM and
110  ;; SB!VM:N-LOWTAG-BITS, needed by "early-objdef" and others
111  ("src/compiler/target/backend-parms" :c-headers)
112  ("src/compiler/generic/parms" :c-headers)
113  ("src/compiler/target/parms" :c-headers)
114  ("src/compiler/generic/early-vm" :c-headers)
115  ("src/compiler/generic/early-objdef" :c-headers)
116  ("src/code/early-array" :c-headers) ; needs "early-vm" numbers
118  ;; This has the BARRIER stuff that the threading support needs,
119  ;; required for some code in 'early-extensions'
120  ("src/code/barrier" :not-host)
121  ("src/code/parse-body" :c-headers)       ; on host for PARSE-BODY
122  ("src/code/unportable-float")
123  ("src/compiler/policy" :c-headers)
124  #!+sb-fasteval ("src/interpreter/basic-env")
125  ;; PARSE-{UNKNOWN,DEPRECATED}-TYPE and other things should be known
126  ;; condition subtypes as soon as possible
127  ("src/code/condition-boot" :not-host)
128  ("src/code/early-extensions" :c-headers) ; on host for COLLECT, SYMBOLICATE, etc.
129  ("src/compiler/parse-lambda-list" :c-headers)
130  ("src/code/restart" :not-host) ; %DEFCONSTANT can bind a restart
132  ("src/code/early-cl")
133  ("src/code/ansi-stream" :not-host)
134  ("src/code/early-fasl" :c-headers)
136  ("src/code/defbangstruct" :c-headers)
137  ("src/code/early-thread")
138  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
139  ;;; basic machinery for the target Lisp. Note that although most of these
140  ;;; files are flagged :NOT-HOST, a few might not be.
142  ("src/code/early-print" :not-host)
143  ("src/code/early-pprint" :not-host)
144  ("src/code/early-impl" :not-host)
146  ("src/code/target-extensions" :not-host)
148  ;; Needed before the first use of WITH-SINGLE-PACKAGE-LOCKED-ERROR.
149  ("src/code/early-package" :not-host)
151  ("src/compiler/defconstant")
153  ("src/code/early-raw-slots" :c-headers)
155  ("src/code/funutils" :not-host)
157  ("src/code/maphash" :not-host)
158  ("src/code/xset" :c-headers) ; for representation of MEMBER type
159  ;; This needs DEF!STRUCT, and is itself needed early so that structure
160  ;; accessors and inline functions defined here can be compiled inline
161  ;; later. (Avoiding full calls increases efficiency)
162  ("src/code/type-class" :c-headers)
164  ("src/code/cas" :not-host)
165  ("src/compiler/early-c" :c-headers)
166  ("src/compiler/fun-info" :c-headers)
167  ("src/pcl/slot-name") ; for calls from 'info-vector'
168  ;; 'info-vector' is needed at least as early as 'fdefinition' so that the
169  ;; inlined INFO-VECTOR-FDEFINITION is available to %COERCE-CALLABLE-TO-FUN.
170  ("src/code/signal" :not-host)
171  ("src/code/target-lfhash" :not-host)
172  ("src/compiler/info-vector" :c-headers)
173  ("src/compiler/globaldb" :c-headers)
174  ("src/code/primordial-type" :c-headers)
175  ("src/code/early-classoid" :c-headers)
176  ("src/code/early-alieneval" :c-headers)  ; for funs and vars needed at build and run time
178  ("src/code/sysmacs" :not-host)
180  ("src/code/target-error" :not-host)
182  ;; "src/code/toplevel.lisp" is the first to need this. It's generated
183  ;; automatically by grovel_headers.c, i.e. it's not under source control.
184  ("output/stuff-groveled-from-headers" :not-host)
186  ("src/code/cold-error"  :not-host)
187  ("src/code/fdefinition" :not-host)
189  ("src/compiler/generic/vm-array" :c-headers)
190  ("src/code/weak"          :not-host)
191  ;; 'target-alieneval' needs FILL-POINTER which is defined in 'array'
192  ("src/code/array"         :not-host) ; needs WEAK-POINTER-VALUE
193  ("src/code/pred" :not-host)
194  ("src/code/debug-var-io")
196  ("src/code/target-alieneval" :not-host)
197  ("src/code/target-c-call"    :not-host)
198  ("src/code/target-allocate"  :not-host)
200  ;; This needs DEFINE-ALIEN-ROUTINE from target-alieneval.
201  ("src/code/misc-aliens" :not-host)
203  ("src/code/early-float"   :not-host)
204  ("src/pcl/early-low" :not-host)
205   ;; Define at most one INTERPRETED-FUNCTION type based on target features
206  #!+sb-eval ("src/code/early-full-eval" :not-host)
207  #!+sb-fasteval ("src/interpreter/function" :not-host)
209  ("src/code/target-sxhash" :not-host) ; needs most-fooative-foo-float constants
211  ("src/code/list"   :not-host)
212  ("src/code/seq"    :not-host) ; "code/seq" should come after "code/list".
213  ("src/code/coerce" :not-host)
215  ("src/code/huffman")
216  ("src/code/target-char"    :not-host)
217  ("src/code/target-unicode" :not-host)
218  ("src/code/string"     :not-host)
219  ("src/code/mipsstrops" :not-host)
221  ("src/code/early-time" :c-headers)
222  ("src/code/unix" :not-host)
223  #!+win32 ("src/code/win32" :not-host)
224  #!+mach  ("src/code/mach"     :not-host)
226  #!+android ("src/code/android-os" :not-host)
227  #!+mach  ("src/code/mach-os"  :not-host)
228  #!+sunos ("src/code/sunos-os" :not-host)
229  #!+hpux  ("src/code/hpux-os"  :not-host)
230  #!+osf1  ("src/code/osf1-os"  :not-host)
231  #!+irix  ("src/code/irix-os"  :not-host)
232  #!+bsd   ("src/code/bsd-os"   :not-host)
233  #!+linux ("src/code/linux-os" :not-host)
234  #!+win32 ("src/code/win32-os" :not-host)
236  ("src/code/share-vm" :not-host)
238  ("src/code/thread" :not-host) ; provides *CURRENT-THREAD* for target-signal
239  ("src/code/target-signal-common" :not-host)
240  #!-win32 ("src/code/target-signal" :not-host) ; needs OS-CONTEXT-T from share-vm
241  #!+win32 ("src/code/target-exception" :not-host)
243  ("src/code/bignum"     :not-host)
244  ("src/code/numbers"    :not-host)
245  ("src/code/float-trap" :not-host)
246  ("src/code/float"      :not-host)
247  ("src/code/irrat"      :not-host)
249  ("src/code/misc" :c-headers)
251  ("src/code/symbol"        :not-host)
252  ("src/code/late-cas"      :not-host)
253  ("src/code/fd-stream"     :not-host)
254  ("src/code/stream"        :not-host)
255  ("src/code/early-format")
257  ("src/code/error-error" :not-host) ; needs WITH-STANDARD-IO-SYNTAX macro
258  ("src/code/common-os" :not-host)
260  ("src/code/deadline" :not-host)
261  ("src/code/serve-event" :not-host)
263  ("src/code/query"  :not-host)
265  ("src/code/sort"  :not-host)
266  ("src/code/time"  :not-host)
267  ("src/code/final" :not-host)
269  ("src/code/exhaust" :not-host)
271  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
272  ;;; compiler (and a few miscellaneous files whose dependencies make it
273  ;;; convenient to stick them here)
275  ("src/compiler/policies")
277  ("src/compiler/macros" :c-headers)
279  ("src/compiler/constantp" :c-headers)
280  ("src/compiler/info-functions" :c-headers)
281  ("src/code/specializable-array" :not-target)
283  ("src/compiler/generic/vm-macs" :c-headers)
284  ("src/compiler/generic/objdef" :c-headers)
286  ;; needed by "compiler/vop"
287  ("src/compiler/sset" :c-headers)
288  ("src/code/early-type" :c-headers)
289  ;; sparc-vm and ppc-vm need sc+offset defined to get at internal
290  ;; error args. This file contains stuff previously in
291  ;; debug-info.lisp.  Should it therefore be :not-host?  -- CSR,
292  ;; 2002-02-05
293  ("src/code/sc-offset" :c-headers)
295  ;; for e.g. BLOCK-ANNOTATION, needed by "compiler/vop"
296  ("src/compiler/node" :c-headers)
297  ;; RECONSTRUCT-LEXENV needs types GLOBAL-VAR and DEFINED-FUN
298  ("src/compiler/lexenv")
300  ;; This has ASSEMBLY-UNIT-related stuff needed by core.lisp.
301  ;; and LABEL, needed by IR2-NLX-INFO
302  ("src/compiler/early-assem")
304  ;; for e.g. PRIMITIVE-TYPE, needed by "vmdef"
305  ("src/compiler/vop" :c-headers)
306  ("src/compiler/constant-leaf")
308  ;; needed by "vm" and "primtype"
309  ("src/compiler/backend" :c-headers)
311  ;; for e.g. MAX-VOP-TN-REFS, needed by "meta-vmdef"
312  ("src/compiler/vmdef" :c-headers)
314  ("src/code/defmacro" :c-headers)
315  ("src/code/destructuring-bind" :c-headers)
317  ;; for e.g. !DEF-PRIMITIVE-TYPE, needed by primtype.lisp, and
318  ;; DEFINE-STORAGE-CLASS, needed by target/vm.lisp
319  ("src/compiler/meta-vmdef" :c-headers)
321  ("src/compiler/fixup") ; for DEFSTRUCT FIXUP, needed by generic/core
322  ("src/compiler/generic/core") ; for CORE-OBJECT-P, needed by x86-64/vm
324  ;; for e.g. DESCRIPTOR-REG, needed by primtype.lisp
325  ("src/compiler/target/vm" :c-headers)
327  ;; KLUDGE: I'd prefer to have this done with a "code/target" softlink
328  ;; instead of a bunch of reader macros. -- WHN 19990308
329  #!+sparc ("src/code/sparc-vm")
330  #!+hppa  ("src/code/hppa-vm")
331  #!+x86   ("src/code/x86-vm"   :not-host)
332  #!+x86-64("src/code/x86-64-vm"   :not-host)
333  #!+ppc   ("src/code/ppc-vm")
334  #!+alpha ("src/code/alpha-vm")
335  #!+mips  ("src/code/mips-vm")
336  #!+arm   ("src/code/arm-vm")
337  #!+arm64 ("src/code/arm64-vm")
339  ;; RANDOM-LAYOUT-CLOS-HASH (in 'class') uses RANDOM, the transform for which
340  ;; uses GENERATE-RANDOM-EXPR-FOR-POWER-OF-2 which becomes BIG-RANDOM-CHUNK,
341  ;; which wants to be inlined, and which when inlined becomes RANDOM-CHUNK,
342  ;; which also wants to be inlined.
343  ("src/code/target-random" :not-host)
344  ;; META-FIXME: I think I figured out why this was, and fixed that,
345  ;; and never removed the following comment, nor can I remember why.
346  ;; FIXME: Classic CMU CL had (OPTIMIZE (SAFETY 2) (DEBUG 2) declared
347  ;; around the compilation of "code/class". Why?
348  ("src/code/class" :c-headers)
349  ("src/pcl/pre-warm")
350  ("src/pcl/low" :not-host)
352  ("src/code/debug-info" :c-headers)
353  ("src/code/source-location")
354  ("src/code/early-class")
355  ("src/code/condition" :not-host)
356  ("src/code/toplevel"  :not-host)
357  ("src/code/parse-defmacro-errors")
358  ("src/code/format-directive")
359  ;; Target-only stuff should usually be compiled late unless it has
360  ;; compile-time side-effects. This file could probably be later,
361  ;; but should certainly be no earlier than the definitions
362  ;; of FORMAT-ERROR and FORMAT-DIRECTIVE.
363  ("src/code/target-format" :not-host)
365  ("src/compiler/generic/primtype" :c-headers)
367  ;; for DEFSTRUCT ALIEN-TYPE, needed by host-type.lisp
368  ("src/code/host-alieneval")
370  ;; can't be done until definition of e.g. DEFINE-ALIEN-TYPE-CLASS in
371  ;; host-alieneval.lisp
372  ("src/code/host-c-call")
374  ;; SB!XC:DEFTYPE is needed in order to compile late-type
375  ;; in the host Common Lisp, and in order to run, it needs
376  ;; %COMPILER-DEFTYPE.
377  ("src/compiler/compiler-deftype" :c-headers)
379  ;; These appear here in the build sequence because they require
380  ;;   * the macro INFO, defined in globaldb.lisp, and
381  ;;   * the function PARSE-DEFMACRO, defined in parse-defmacro.lisp,
382  ;; and because they define
383  ;;   * the function SPECIFIER-TYPE, which is used in fndb.lisp.
384  ("src/code/late-type" :c-headers)
385  ;; Compile target-only stuff after all defglobals like *CONS-T-T-TYPE*
386  ;; and all type-classes are defined.
387  ("src/code/target-type" :not-host)
388  ("src/code/deftypes-for-target" :c-headers)
390  ;; defines IR1-ATTRIBUTES macro, needed by proclaim.lisp
391  ("src/compiler/knownfun")
393  ;; needs FUN-INFO structure slot setters, defined in knownfun.lisp
394  ("src/compiler/fun-info-funs")
396  ;; stuff needed by "code/defstruct"
397  ("src/code/cross-type" :c-headers :not-target)
398  ("src/compiler/generic/vm-type" :c-headers)
399  ("src/compiler/proclaim" :c-headers)
401  ("src/code/class-init" :c-headers)
403  ;; The DEFSTRUCT machinery needs SB!XC:SUBTYPEP, defined in
404  ;; "code/late-type", and SB!XC:TYPEP, defined in "code/cross-type",
405  ;; and SPECIALIZE-ARRAY-TYPE, defined in "compiler/generic/vm-type",
406  ;; and SB!XC:PROCLAIM, defined in "src/compiler/proclaim"
407  ;; FIXME: #+ should be (and sb-xc-host) but it isn't set yet.
408  ("src/code/defstruct"  :c-headers #+cmucl :ignore-failure-p)
409  ("src/code/target-defstruct" :not-host)
411  ;; ALIEN-VALUE has to be defined as a class (done by DEFSTRUCT
412  ;; machinery) before we can set its superclasses here.
413  ("src/code/alien-type")
415  ;; This needs not just the SB!XC:DEFSTRUCT machinery, but also
416  ;; the TYPE= stuff defined in late-type.lisp, and the
417  ;; CHECK-FUN-NAME defined in proclaim.lisp.
418  ("src/code/force-delayed-defbangstructs" :c-headers)
420  ("src/code/typep" :not-host)
422  ("src/compiler/compiler-error")
424  ("src/code/type-init")
425  ;; Now that the type system is initialized, fix up UNKNOWN types that
426  ;; have crept in.
427  ("src/compiler/fixup-type")
429  ;; These define target types needed by fndb.lisp.
430  ("src/code/package" :c-headers)
431  ("src/code/random")
432  ("src/code/hash-table" :c-headers)
433  ("src/code/readtable")
434  ("src/code/pathname")
436  ("src/compiler/fndb")
437  ("src/compiler/generic/vm-fndb")
439  ("src/compiler/generic/late-objdef" :c-headers)
441  ("src/compiler/generic/interr" :c-headers)
443  ("src/compiler/bit-util")
445  ("src/code/load")
447  #!+linkage-table ("src/code/linkage-table" :not-host)
448  #!+os-provides-dlopen ("src/code/foreign-load" :not-host)
449  #!+(and os-provides-dlopen (not win32)) ("src/code/unix-foreign-load" :not-host)
450  #!+(and os-provides-dlopen win32) ("src/code/win32-foreign-load" :not-host)
451  ("src/code/foreign")
453  ("src/code/fop") ; needs macros from code/load.lisp
455  ("src/compiler/ctype")
456  ("src/compiler/disassem")
457  ("src/compiler/assem")
459  ;; Compiling this requires fop definitions from code/fop.lisp and
460  ("src/compiler/dump")
462  ("src/compiler/ir1report") ; for COMPILER-ERROR-CONTEXT
463  ("src/code/target-pathname" :not-host) ; needs "code/pathname"
464  ("src/compiler/main") ; needs DEFSTRUCT FASL-OUTPUT from dump.lisp
465  ("src/compiler/xref")
466  ("src/compiler/target-main" :not-host)
467  ("src/compiler/ir1tran")
468  ("src/compiler/ir1tran-lambda")
469  ("src/compiler/ir1-translators")
470  ;; FIXME: #+ should be (and sb-xc-host) but it isn't set yet.
471  ("src/compiler/ir1util" #+cmucl :ignore-failure-p)
472  ("src/compiler/callable-args")
473  ("src/compiler/ir1opt")
474  ("src/compiler/loop")
476  ("src/compiler/ir1final")
477  ("src/compiler/array-tran")
478  ("src/compiler/seqtran")
479  ("src/compiler/typetran")
480  ("src/compiler/generic/vm-typetran")
481  ("src/compiler/float-tran")
482  ("src/compiler/saptran")
483  ("src/compiler/srctran")
484  ("src/code/quantifiers")
485  ("src/compiler/bitops-derive-type")
486  ("src/compiler/generic/vm-tran")
487  ("src/compiler/locall")
488  ("src/compiler/dfo")
489  ("src/compiler/dce")
490  ("src/compiler/checkgen")
491  ("src/compiler/constraint")
492  ("src/compiler/physenvanal")
494  ("src/compiler/tn")
495  ("src/compiler/life")
497  ("src/compiler/debug-dump")
498  ("src/compiler/generic/utils" :c-headers)
499  ("src/compiler/fopcompile")
501  ("src/assembly/assemfile" :not-target)
503  ;; Compiling this file requires the macros SB!ASSEM:EMIT-LABEL and
504  ;; SB!ASSEM:EMIT-POST-IT, defined in assem.lisp, and also possibly
505  ;; the definition of the LOCATION-INFO structure (if structures in
506  ;; the host lisp have setf expanders rather than setf functions).
507  ("src/compiler/late-vmdef")
509  ("src/compiler/target-dstate" :not-host)
510  ("src/compiler/target/insts")
511  ("src/compiler/target/macros")
512  ("src/compiler/generic/pinned-objects")
513  ("src/compiler/generic/early-type-vops")
515  ("src/assembly/target/support")
517  ("src/compiler/target/move")
518  ("src/compiler/target/float")
519  #!+sb-simd-pack
520  ("src/compiler/target/simd-pack")
521  ("src/compiler/target/sap")
522  ("src/compiler/target/system")
523  ("src/compiler/target/char")
524  ("src/compiler/target/memory")
525  ("src/compiler/target/arith"
526   ;; KLUDGE: for ppc and sparc this appears to be necessary, as it
527   ;; used to be for array VOPs for X86 until ca. 0.8.5.24 when CSR's
528   ;; patch for that architecture was finally committed
529   ;;
530   ;; old (0.8.5.23) comment on the array-VOP hack for X86:
531   ;; x Compiling this file for X86 raises alarming warnings of
532   ;; x the form
533   ;; x    Argument FOO to VOP CHECK-BOUND has SC restriction
534   ;; x    DESCRIPTOR-REG which is not allowed by the operand type:
535   ;; x      (:OR POSITIVE-FIXNUM)
536   ;; x This seems not to be something that I broke, but rather a "feature"
537   ;; x inherited from classic CMU CL. (Debian cmucl_2.4.8.deb compiling
538   ;; x Debian cmucl_2.4.8.tar.gz raises the same warning). Thus, even though
539   ;; x these warnings are severe enough that they would ordinarily abort
540   ;; x compilation, for now we blithely ignore them and press on to more
541   ;; x pressing problems. Someday, though, it would be nice to figure out
542   ;; x what the problem is and fix it.
543   #!+(or ppc) :ignore-failure-p)
544  ("src/code/cross-modular"  :not-target)
546  ("src/compiler/generic/late-type-vops") ;; KLUDGE: it's not so late anymore
547  ("src/compiler/target/type-vops")
549  ("src/compiler/target/subprim")
550  ("src/compiler/target/debug")
551  ("src/compiler/target/c-call")
552  ("src/compiler/target/cell")
553  ("src/compiler/target/values")
554  ("src/compiler/target/alloc")
555  ("src/compiler/target/call")
556  ("src/compiler/target/nlx")
557  ("src/compiler/generic/late-nlx")
558  ("src/compiler/target/show")
559  ("src/compiler/target/array")
560  ("src/compiler/generic/type-error")
561  ("src/compiler/target/pred")
563  ;; KLUDGE: The assembly files need to be compiled twice: once as
564  ;; normal lisp files, and once by sb-c:assemble-file.  We use a
565  ;; different suffix / "file type" for the :assem versions to make
566  ;; sure we don't scribble over anything we shouldn't.
568  ("src/assembly/target/assem-rtns")
569  ("src/assembly/target/array")
570  ("src/assembly/target/arith")
571  ("src/assembly/target/alloc")
572  ;; assembly files are all loaded by genesis before any compiled files.
573  ("src/assembly/target/tramps"     :assem :not-host)
574  ("src/assembly/target/assem-rtns" :assem :not-host)
575  ("src/assembly/target/array"      :assem :not-host)
576  ("src/assembly/target/arith"      :assem :not-host)
577  ("src/assembly/target/alloc"      :assem :not-host)
579  ("src/compiler/pseudo-vops")
581  ("src/compiler/aliencomp")
583  ("src/compiler/ltv")
584  ("src/compiler/gtn")
585  ("src/compiler/ltn")
586  ("src/compiler/stack")
587  ("src/compiler/control")
588  ("src/compiler/entry")
589  ("src/compiler/ir2tran")
591  ("src/compiler/generic/vm-ir2tran")
593  ("src/compiler/copyprop")
594  ("src/compiler/represent")
595  ("src/compiler/ir2opt")
596  ("src/compiler/pack")
597  ("src/compiler/pack-iterative")
598  ("src/compiler/codegen")
599  ("src/compiler/debug")
601  #!+sb-dyncount ("src/compiler/dyncount")
602  #!+sb-dyncount ("src/code/dyncount")
604  ;; needed by OPEN-FASL-OUTPUT, which is called by COMPILE-FILE
605  ("src/code/format-time")
607  ;; needed by various unhappy-path cases in the cross-compiler
608  ("src/code/error")
610  ;; This wasn't in classic CMU CL "comcom.lisp", but it has some stuff
611  ;; that Python-as-cross-compiler has turned out to need.
612  ("src/code/macroexpand")
614  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
615  ;; files which depend in some way (directly or indirectly) on stuff
616  ;; compiled as part of the compiler
618  ("src/code/late-extensions") ; needs condition system
619  ("src/compiler/generic/target-core" :not-host) ; uses stuff from
620                                                 ;   "compiler/generic/core"
622  ("src/code/eval"              :not-host) ; uses INFO, wants compiler macro
623  ("src/code/target-sap"        :not-host) ; uses SAP-INT type
624  ("src/code/target-package"    :not-host) ; needs "code/package"
625  ("src/code/module"            :not-host)
626  ("src/code/bignum-random"     :not-host) ; needs "code/random" and
627                                           ;   "code/bignum"
628  ("src/code/target-hash-table" :not-host) ; needs "code/hash-table"
629  ("src/code/host-pprint") ; defines QUEUED-OP needed by 'pprint'
630  ("src/code/pprint" :not-host) ; defines WITH-PRETTY-STREAM needed by 'print'
631  ("src/code/print" :not-host)
632  ("src/code/reader"            :not-host) ; needs "code/readtable"
633  ("src/code/target-stream"     :not-host) ; needs WHITESPACEP from "code/reader"
634  #!-win32
635  ("src/code/unix-pathname"     :not-host)
636  #!+win32
637  ("src/code/win32-pathname"    :not-host)
638  ("src/code/filesys"           :not-host) ; needs HOST from "code/pathname"
640  ("src/code/simple-fun"        :not-host) ; function slot accessors
641  ("src/code/target-misc"       :not-host) ; dribble-stream, used by "save"
642  ("src/code/sharpm"            :not-host) ; uses stuff from "code/reader"
644  ("src/code/early-step")                  ; target-thread needs *STEP-OUT*
646  ("src/code/gc"     :not-host)
647  ("src/code/target-thread"     :not-host)
648  ("src/code/timer" :not-host)
650  ;; defines SB!DI:DO-DEBUG-FUN-BLOCKS, needed by target-disassem.lisp
651  ("src/code/alloc"  :not-host) ; needs foo-SPACE-START
652  ("src/code/debug-int" :not-host)
653  ("src/code/interr" :not-host)
655  ;; target-only assemblerish stuff
656  ("src/compiler/target-disassem"     :not-host)
657  ("src/compiler/target/target-insts" :not-host)
659  ("src/code/debug" :not-host)
661  ("src/code/octets" :not-host)
662  ("src/code/external-formats/enc-basic" :not-host)
663  #!+sb-unicode
664  ("src/code/external-formats/enc-ucs" :not-host) ; win32 needs this
666  #!+sb-eval
667  ("src/code/full-eval"   :not-host) ; uses INFO, ARG-COUNT-ERROR
669  ("src/code/bit-bash"    :not-host) ; needs %NEGATE from assembly/target/arith
671  ("src/code/target-load" :not-host) ; needs special vars from code/load.lisp
673  #!-(or x86 x86-64)
674  ("src/compiler/target/sanctify" :not-host)
676  ;; FIXME: Does this really need stuff from compiler/dump.lisp?
677  ("src/compiler/target-dump" :not-host) ; needs stuff from compiler/dump.lisp
679  ("src/code/cold-init" :not-host) ; needs (SETF EXTERN-ALIEN) macroexpansion
681  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
682  ;; target macros and DECLAIMs installed at build-the-cross-compiler time
684  ;; FIXME: here? earlier?  can probably be as late as possible.  Also
685  ;; maybe call it FORCE-DELAYED-PROCLAIMS?
686  ("src/compiler/late-proclaim")
688  ;; fundamental target macros (e.g. CL:DO and CL:DEFUN) and support
689  ;; for them
690  ("src/code/defboot")
691  ("src/code/setf")
692  ("src/code/macros")
693  ("src/code/loop")
695  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
696  ;; other target-code-building stuff which can't be processed until
697  ;; machinery like SB!XC:DEFMACRO exists
699  ("src/code/late-format") ; needs SB!XC:DEFMACRO
700  ("src/code/sxhash") ; needs SB!XC:DEFINE-MODIFY-MACRO
702  ("src/code/late-globaldb" :not-host)
703  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
704  ;; PCL-related stuff, which shouldn't need to be done earlier than
705  ;; anything else in cold build because after all it used to be
706  ;; postponed 'til warm init with no problems.
708  ("src/pcl/walk"))
710 ;;; warm build skips the list of files above even though there is no "#!" macro
711 ;;; at this point. That's not specified behavior of *READ-SUPPRESS*.
712 ;;; The place to change this behavior is in DISPATCH-CHAR-ERROR.
713 ;;; Then we would need to define "#!" to do something whenever this file is read.
714 ;;; If we're going down that route, we should change these feature expressions
715 ;;; to use "#!" syntax rather than rely on a bug to skip the above form.
716 #+warm-build-phase
717 (("src/code/warm-error"
718   "src/code/room" ; for MAP-ALLOCATED-OBJECTS
719   ;; We re-nickname SB-SEQUENCE as SEQUENCE now.
720   ;; It could be done in genesis, but not earlier,
721   ;; since the host has a package of that name.
722   "src/code/defpackage")
724  #+sb-fasteval
725  ("src/interpreter/macros"
726   "src/interpreter/checkfuns"
727   "src/interpreter/env"
728   "src/interpreter/sexpr"
729   "src/interpreter/special-forms"
730   "src/interpreter/eval"
731   "src/interpreter/debug")
733  ("src/code/external-formats/enc-ebcdic")
734  #+sb-unicode
735  ("src/code/external-formats/enc-cyr"
736   "src/code/external-formats/enc-dos"
737   "src/code/external-formats/enc-iso"
738   "src/code/external-formats/enc-win"
739   "src/code/external-formats/enc-mac"
740   "src/code/external-formats/mb-util"
741   "src/code/external-formats/enc-cn-tbl"
742   "src/code/external-formats/enc-cn"
743   "src/code/external-formats/enc-jpn-tbl"
744   "src/code/external-formats/enc-jpn"
745   "src/code/external-formats/enc-utf")
747  ("src/code/stubs")
749  ;; CLOS, derived from the PCL reference implementation
750  ;;
751  ;; This PCL build order is based on a particular
752  ;; (arbitrary) linearization of the declared build
753  ;; order dependencies from the old PCL defsys.lisp
754  ;; dependency database.
755  ("src/pcl/macros"
756   "src/pcl/compiler-support"
757   "src/pcl/defclass"
758   "src/pcl/defs"
759   "src/pcl/fngen"
760   "src/pcl/wrapper"
761   "src/pcl/cache"
762   "src/pcl/dlisp"
763   "src/pcl/boot"
764   "src/pcl/vector"
765   "src/pcl/slots-boot"
766   "src/pcl/combin"
767   "src/pcl/dfun"
768   "src/pcl/ctor"
769   "src/pcl/braid"
770   "src/pcl/dlisp3"
771   "src/pcl/generic-functions"
772   "src/pcl/slots"
773   "src/pcl/init"
774   "src/pcl/std-class"
775   "src/pcl/cpl"
776   "src/pcl/fsc"
777   "src/pcl/methods"
778   "src/pcl/fixup"
779   "src/pcl/defcombin"
780   "src/pcl/ctypes"
781   "src/pcl/env"
782   "src/pcl/documentation"
783   "src/pcl/print-object"
784   "src/pcl/precom1"
785   "src/pcl/precom2")
787  ("src/code/setf-funs"
788   ;; miscellaneous functionality which depends on CLOS
789   "src/code/late-condition"
791   ;; CLOS-level support for the Gray OO streams
792   ;; extension (which is also supported by various
793   ;; lower-level hooks elsewhere in the code)
794   "src/pcl/gray-streams-class"
795   "src/pcl/gray-streams"
797   ;; CLOS-level support for User-extensible sequences.
798   "src/pcl/sequence"
800   ;; other functionality not needed for cold init, moved
801   ;; to warm init to reduce peak memory requirement in
802   ;; cold init
803   "src/code/describe"
805   "src/code/describe-policy"
806   "src/code/inspect"
807   "src/code/profile"
808   #+x86-64 "src/code/aprof" ; precise allocation profiler
809   "src/code/ntrace"
810   "src/code/step"
811   "src/code/warm-lib"
812   #+win32 "src/code/warm-mswin"
813   "src/code/run-program"
814   #+gencgc "src/code/traceroot"
816   #+immobile-code "src/code/immobile-space"
817   "src/code/repack-xref"
818   #+cheneygc "src/code/purify"
819   "src/code/save"))