summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-06-02 01:32:12 +0200
committerLudovic Courtès <ludo@gnu.org>2019-06-02 01:38:36 +0200
commitb2cddc6fb1df4bbde23149b3a36ac4cdfe1bd535 (patch)
tree3327153502f190fd037668c95acf7b0dec0fb24a
parentbb64b2e7c0ab14cf899c1d81892b59fa877d4d9c (diff)
downloadguix-b2cddc6fb1df4bbde23149b3a36ac4cdfe1bd535.tar.gz
compile: Adjust for Guile 3.
* guix/build/compile.scm (%default-optimizations): Adjust to the new
names in Guile 2.9.2.
-rw-r--r--guix/build/compile.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/build/compile.scm b/guix/build/compile.scm
index 9e31be93ff..794f12379c 100644
--- a/guix/build/compile.scm
+++ b/guix/build/compile.scm
@@ -40,8 +40,12 @@
 
 (define %default-optimizations
   ;; Default optimization options (equivalent to -O2 on Guile 2.2).
-  (append (tree-il-default-optimization-options)
-          (cps-default-optimization-options)))
+  (append (if (defined? 'tree-il-default-optimization-options)
+              (tree-il-default-optimization-options) ;Guile 2.2
+              (tree-il-optimizations))               ;Guile 3
+          (if (defined? 'cps-default-optimization-options)
+              (cps-default-optimization-options)  ;Guile 2.2
+              (cps-optimizations))))              ;Guile 3
 
 (define %lightweight-optimizations
   ;; Lightweight optimizations (like -O0, but with partial evaluation).