mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
compile: Pre-load the compiler outside 'with-target'.
* guix/build/compile.scm (compile-files): Move call to 'compile' before 'with-target'. Failing to do that, if the target has a different word size than the host, the first call to 'compile-file' fails with: ice-9/eval.scm:293:34: In procedure load-thunk-from-memory: ELF file does not have native word size while attempting loading 'language/spec.go'.
This commit is contained in:
parent
0f25feb159
commit
12da5162e4
1 changed files with 5 additions and 4 deletions
|
@ -194,6 +194,11 @@ (define (build file)
|
|||
(with-augmented-search-path %load-path source-directory
|
||||
(with-augmented-search-path %load-compiled-path build-directory
|
||||
(with-fluids ((*current-warning-prefix* ""))
|
||||
;; Make sure the compiler's modules are loaded before 'with-target'
|
||||
;; (since 'with-target' influences the .go loader), and before
|
||||
;; starting to compile files in parallel.
|
||||
(compile #f)
|
||||
|
||||
(with-target host
|
||||
(lambda ()
|
||||
;; FIXME: To work around <https://bugs.gnu.org/15602>, we first
|
||||
|
@ -202,10 +207,6 @@ (define (build file)
|
|||
#:report-load report-load
|
||||
#:debug-port debug-port)
|
||||
|
||||
;; 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>.
|
||||
|
|
Loading…
Reference in a new issue