diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index e37b75140..3162ec08b 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -24,6 +24,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 format) + #:use-module (ice-9 threads) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) @@ -395,24 +396,24 @@ makefiles." (format #t "debugging output written to ~s using ~s~%" debug-output objcopy-command)) - (for-each (lambda (file) - (and (or (elf-file? file) (ar-file? file)) - (or (not debug-output) - (make-debug-file file)) - - ;; Ensure the file is writable. - (begin (make-file-writable file) #t) - - (zero? (apply system* strip-command - (append strip-flags (list file)))) - (or (not debug-output) - (add-debug-link file)))) - (find-files dir - (lambda (file stat) - ;; Ignore symlinks such as: - ;; libfoo.so -> libfoo.so.0.0. - (eq? 'regular (stat:type stat))) - #:stat lstat))) + (par-for-each (lambda (file) + (and (or (elf-file? file) (ar-file? file)) + (or (not debug-output) + (make-debug-file file)) + + ;; Ensure the file is writable. + (begin (make-file-writable file) #t) + + (zero? (apply system* strip-command + (append strip-flags (list file)))) + (or (not debug-output) + (add-debug-link file)))) + (find-files dir + (lambda (file stat) + ;; Ignore symlinks such as: + ;; libfoo.so -> libfoo.so.0.0. + (eq? 'regular (stat:type stat))) + #:stat lstat))) (or (not strip-binaries?) (every strip-dir