Speed up SVM cross-build with new finish-cross-compilation:files.
authorMatt Birkholz <matt@birchwood-abbey.net>
Sun, 5 Mar 2017 18:10:48 +0000 (11:10 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sun, 5 Mar 2017 18:10:48 +0000 (11:10 -0700)
Undo 0ee3b64 <compiler/base/crsend.scm: Use a compiled compress
procedure ASAP.>.  Delay compressing info files until after the .mocs
are processed and a compiled runtime can be booted.

src/Makefile.in
src/compiler/base/crsend.scm

index 0baf53dfdebb499cea3284102c5b59b1263cccee..0ae21ef9cb2e60fb5d4d37705b0fcf3ea352c4ed 100644 (file)
@@ -750,9 +750,14 @@ cross-target: cross-host
 cross-end: cross-host
        (echo '(let ((env (->environment (quote (RUNTIME)))))' && \
         echo '  (load "../compiler/base/crsend" env)' && \
-        echo '  ((access FINISH-CROSS-COMPILATION:DIRECTORY env) ".."))') \
+        echo '  ((access FINISH-CROSS-COMPILATION:FILES env) ".."))') \
        | (cd runtime && ../microcode/scheme --batch-mode --library ../lib \
-           --fasl make.bin)
+                                            --fasl make.bin)
+       (echo '(let ((env (->environment (quote (RUNTIME)))))' && \
+        echo '  (load "../compiler/base/crsend" env)' && \
+        echo '  ((access FINISH-CROSS-COMPILATION:INFO-FILES env) ".."))') \
+        | (cd runtime && ../microcode/scheme --batch-mode --library ../lib \
+                                             --fasl make.com)
 
 ### Stuff that depends on running the code we just compiled, because it
 ### uses Edwin macros.  This is a kludge until we can fix macro phasing
index 5dba929c9ceac23302ce02e2af4c6827c7a0afb6..934ad8db1e3dd9a0c929459e9a067f39528ec2cc 100644 (file)
@@ -32,6 +32,8 @@ USA.
 ;;; compiler.
 
 (declare (usual-integrations))
+
+(load-option 'COMPRESS)                        ; XXX ugh
 \f
 (define (finish-cross-compilation:directory directory #!optional force?)
   (let ((force? (if (default-object? force?) #f force?)))
@@ -52,6 +54,21 @@ USA.
                         (finish-cross-compilation:file pathname force?))))
                (directory-read (pathname-as-directory directory))))))
 
+(define (finish-cross-compilation:files directory #!optional force?)
+  (let ((force? (if (default-object? force?) #f force?)))
+    (let loop ((directory directory))
+      (for-each (lambda (pathname)
+                 (cond ((file-directory? pathname)
+                        (if (not (let ((ns (file-namestring pathname)))
+                                   (or (string=? ns ".")
+                                       (string=? ns ".."))))
+                            (loop pathname)))
+                       ((let ((t (pathname-type pathname)))
+                          (and (string? t)
+                               (string=? t "moc")))
+                        (finish-cross-compilation:file pathname force?))))
+               (directory-read (pathname-as-directory directory))))))
+
 (define (finish-cross-compilation:info-files directory #!optional force?)
   (let ((force? (if (default-object? force?) #f force?)))
     (let loop ((directory directory))
@@ -219,9 +236,4 @@ USA.
   (sc-macro-transformer
    (lambda (form environment)
      environment
-     (apply microcode-type (cdr form)))))
-
-;;(load-option 'COMPRESS)                      ; XXX ugh
-;; The interpreted compress is terribly slow.
-(finish-cross-compilation:file "cpress.moc")
-(load "cpress.com" (->environment '(runtime compress)))
\ No newline at end of file
+     (apply microcode-type (cdr form)))))
\ No newline at end of file