[bug#36477,v3,42/48] gexp: Pass target to compiled-modules in lower-gexp.
diff mbox series

Message ID 20190902153333.11190-43-m.othacehe@gmail.com
State New
Headers show
Series
  • Add --target support to guix system
Related show

Commit Message

Mathieu Othacehe Sept. 2, 2019, 3:33 p.m. UTC
* guix/gexp.scm (lower-gexp): Pass target argument to compiled-modules.
---
 guix/gexp.scm | 1 +
 1 file changed, 1 insertion(+)

Comments

Ludovic Courtès Sept. 4, 2019, 12:31 p.m. UTC | #1
Hi,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> * guix/gexp.scm (lower-gexp): Pass target argument to compiled-modules.

This seems obvious at first sight, but actually, I’m not sure it’s
correct because Guile code always runs “natively”.  That is, when you
write:

  (computed-file "foo" (with-imported-modules … #~(begin …)))

the gexp here necessarily runs “natively” on the current system.  Thus,
the modules have to be compiled natively.

The cross-compilation target should only affect things that the regex
refers to with ‘ungexp’ or ‘ungexp-splicing’.

WDYT?

Ludo’.

Patch
diff mbox series

diff --git a/guix/gexp.scm b/guix/gexp.scm
index 514422cb08..afa28779c8 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -727,6 +727,7 @@  derivations--e.g., code evaluated for its side effects."
                        (compiled (if (pair? %modules)
                                      (compiled-modules %modules
                                                        #:system system
+                                                       #:target target
                                                        #:module-path module-path
                                                        #:extensions extensions
                                                        #:guile guile