mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-09 23:16:41 -04:00
Accept one filename in make-host-2.sh to compile just that
The use case is that after an attempted parallel compilation that crashed, you can restart a compile for any individual file. The compile-for-effect-only flag allows rapdily skipping through all files preceding the requested one, any of which may have been prerequisites for actually compiling.
This commit is contained in:
parent
e79e7f6799
commit
6849f8c406
|
|
@ -47,6 +47,14 @@ rm -f output/after-xc.core
|
|||
# the only disadvantage seems to be the extra time required to reload
|
||||
# the fasl files into the new host Lisp, and that doesn't seem to be
|
||||
# an enormously important disadvantage, either.)
|
||||
if [ $# -gt 0 ]
|
||||
then
|
||||
files=\'\(\"$1\"\) # FIXME: create string-quoted list of each arg individually
|
||||
echo //compiling $files
|
||||
echo '(defvar *compile-files* '${files}')(load "make-host-2.lisp")' | $SBCL_XC_HOST
|
||||
exit
|
||||
fi
|
||||
|
||||
echo //running cross-compiler to create target object files
|
||||
echo '(load "loader.lisp") (load-sbcl-file "make-host-2.lisp")' | $SBCL_XC_HOST
|
||||
|
||||
|
|
|
|||
|
|
@ -145,18 +145,31 @@
|
|||
(sb-cold::exit-process 1))))
|
||||
(values))))
|
||||
|
||||
;;; Actually compile
|
||||
(let ((sb-xc:*compile-print* nil))
|
||||
(if (make-host-2-parallelism)
|
||||
(funcall 'parallel-make-host-2 (make-host-2-parallelism))
|
||||
(let ((total
|
||||
(count-if (lambda (x) (not (find :not-target (cdr x))))
|
||||
(get-stems-and-flags 2)))
|
||||
(n 0)
|
||||
(sb-xc:*compile-verbose* nil))
|
||||
(with-math-journal
|
||||
(do-stems-and-flags (stem flags 2)
|
||||
(unless (position :not-target flags)
|
||||
(format t "~&[~D/~D] ~A" (incf n) total (stem-remap-target stem))
|
||||
(target-compile-stem stem flags)
|
||||
(terpri)))))))
|
||||
;;; See whether we're in individual file mode
|
||||
(cond
|
||||
((boundp 'cl-user::*compile-files*)
|
||||
(let ((files
|
||||
(mapcar (lambda (x) (concatenate 'string "src/" x))
|
||||
(symbol-value 'cl-user::*compile-files*))))
|
||||
(with-compilation-unit ()
|
||||
(do-stems-and-flags (stem flags 2)
|
||||
(unless (position :not-target flags)
|
||||
(let* ((*compile-for-effect-only* (not (member stem files :test #'string=)))
|
||||
(sb-xc:*compile-print* (not sb-xc:*compile-print*)))
|
||||
(target-compile-stem stem flags)))))))
|
||||
(t
|
||||
;; Actually compile
|
||||
(let ((sb-xc:*compile-print* nil))
|
||||
(if (make-host-2-parallelism)
|
||||
(funcall 'parallel-make-host-2 (make-host-2-parallelism))
|
||||
(let ((total
|
||||
(count-if (lambda (x) (not (find :not-target (cdr x))))
|
||||
(get-stems-and-flags 2)))
|
||||
(n 0)
|
||||
(sb-xc:*compile-verbose* nil))
|
||||
(with-math-journal
|
||||
(do-stems-and-flags (stem flags 2)
|
||||
(unless (position :not-target flags)
|
||||
(format t "~&[~D/~D] ~A" (incf n) total (stem-remap-target stem))
|
||||
(target-compile-stem stem flags)
|
||||
(terpri)))))))))
|
||||
|
|
|
|||
|
|
@ -1340,7 +1340,7 @@
|
|||
(inheritable-constraints nil :type (or null (array t 1)))
|
||||
(private-constraints nil :type (or null (array t 1)))
|
||||
(equality-constraints nil :type (or null (array t 1)))
|
||||
|
||||
|
||||
;; The FOP handle of the lexical variable represented by LAMBDA-VAR
|
||||
;; in the fopcompiler.
|
||||
(fop-value nil)
|
||||
|
|
|
|||
Loading…
Reference in a new issue