gexp: Simplify use of 'with-target' in 'compiled-modules'.

* guix/gexp.scm (compiled-modules)[build]: Simplify 'with-target'
handling.
This commit is contained in:
Ludovic Courtès 2020-05-15 15:22:07 +02:00
parent 1130e8c817
commit d2cd4134c1
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -1456,17 +1456,12 @@ TARGET, a GNU triplet."
(ungexp (* total 2))
entry)
(ungexp-splicing
(if target
(gexp ((with-target (ungexp target)
(lambda ()
(compile-file entry
#:output-file output
#:opts
%auto-compilation-options)))))
(gexp ((compile-file entry
#:output-file output
#:opts %auto-compilation-options)))))
(with-target (ungexp (or target (gexp %host-type)))
(lambda ()
(compile-file entry
#:output-file output
#:opts
%auto-compilation-options)))
(+ 1 processed))))