summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--build-aux/compile-all.scm3
-rw-r--r--guix/build/pull.scm3
2 files changed, 6 insertions, 0 deletions
diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm
index 7c937a0422..46b381723b 100644
--- a/build-aux/compile-all.scm
+++ b/build-aux/compile-all.scm
@@ -81,6 +81,9 @@
    (let ((files (filter file-needs-compilation? files)))
      (for-each load-module-file files)
      (let ((mutex (make-mutex)))
+       ;; Make sure compilation related modules are loaded before starting to
+       ;; compile files in parallel.
+       (compile #f)
        (par-for-each (lambda (file)
                        (compile-file* file mutex))
                      files)))))
diff --git a/guix/build/pull.scm b/guix/build/pull.scm
index ccf1868516..871bf6f535 100644
--- a/guix/build/pull.scm
+++ b/guix/build/pull.scm
@@ -125,6 +125,9 @@ containing the source code.  Write any debugging output to DEBUG-PORT."
       (newline)
       (let ((mutex (make-mutex))
             (completed 0))
+        ;; Make sure compilation related modules are loaded before starting to
+        ;; compile files in parallel.
+        (compile #f)
         (par-for-each
          (lambda (file)
            (with-mutex mutex