mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 21:46:35 +01:00
compile: Run the load phase within 'with-target'.
* guix/build/compile.scm (compile-files)[build]: Remove 'with-target'. Wrap body in 'with-target'.
This commit is contained in:
parent
93add9bf7d
commit
041c3c22dc
1 changed files with 22 additions and 23 deletions
|
@ -184,36 +184,35 @@ (define (build file)
|
|||
;; Exit as soon as something goes wrong.
|
||||
(exit-on-exception
|
||||
file
|
||||
(with-target host
|
||||
(lambda ()
|
||||
(let ((relative (relative-file source-directory file)))
|
||||
(compile-file file
|
||||
#:output-file (string-append build-directory "/"
|
||||
(scm->go relative))
|
||||
#:opts (append warning-options
|
||||
(optimization-options relative))))))))
|
||||
(let ((relative (relative-file source-directory file)))
|
||||
(compile-file file
|
||||
#:output-file (string-append build-directory "/"
|
||||
(scm->go relative))
|
||||
#:opts (append warning-options
|
||||
(optimization-options relative))))))
|
||||
|
||||
(with-augmented-search-path %load-path source-directory
|
||||
(with-augmented-search-path %load-compiled-path build-directory
|
||||
(with-fluids ((*current-warning-prefix* ""))
|
||||
(with-target host
|
||||
(lambda ()
|
||||
;; FIXME: To work around <https://bugs.gnu.org/15602>, we first
|
||||
;; load all of FILES.
|
||||
(load-files source-directory files
|
||||
#:report-load report-load
|
||||
#:debug-port debug-port)
|
||||
|
||||
;; FIXME: To work around <https://bugs.gnu.org/15602>, we first load all
|
||||
;; of FILES.
|
||||
(load-files source-directory files
|
||||
#:report-load report-load
|
||||
#:debug-port debug-port)
|
||||
;; Make sure compilation related modules are loaded before
|
||||
;; starting to compile files in parallel.
|
||||
(compile #f)
|
||||
|
||||
;; Make sure compilation related modules are loaded before starting to
|
||||
;; compile files in parallel.
|
||||
(compile #f)
|
||||
;; XXX: Don't use too many workers to work around the insane
|
||||
;; memory requirements of the compiler in Guile 2.2.2:
|
||||
;; <https://lists.gnu.org/archive/html/guile-devel/2017-05/msg00033.html>.
|
||||
(n-par-for-each (min workers 8) build files)
|
||||
|
||||
;; XXX: Don't use too many workers to work around the insane memory
|
||||
;; requirements of the compiler in Guile 2.2.2:
|
||||
;; <https://lists.gnu.org/archive/html/guile-devel/2017-05/msg00033.html>.
|
||||
(n-par-for-each (min workers 8) build files)
|
||||
|
||||
(unless (zero? total)
|
||||
(report-compilation #f total total))))))
|
||||
(unless (zero? total)
|
||||
(report-compilation #f total total))))))))
|
||||
|
||||
(eval-when (eval load)
|
||||
(when (and (string=? "2" (major-version))
|
||||
|
|
Loading…
Reference in a new issue