summaryrefslogtreecommitdiff
path: root/module/scripts
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2020-05-11 22:42:50 +0200
committerAndy Wingo <wingo@pobox.com>2020-05-12 09:54:19 +0200
commitcb8cabe85f535542ac4fcb165d89722500e42653 (patch)
tree7c48aa561ceb705d378e14a70d5e12f527e836e3 /module/scripts
parent44ad8fbde55df452ac1c88427662403e7af5b9bb (diff)
downloadguile-cb8cabe85f535542ac4fcb165d89722500e42653.tar.gz
Delay loading CPS unless CPS compiler used
* module/language/tree-il/spec.scm: Remove #:compilers declaration; instead rely on choose-compiler. (choose-compiler): Load compilers on demand. * module/system/base/compile.scm (find-language-joint): Use next-pass instead of lookup-compilation-order, to avoid loading unused compilers. (read-and-compile): Adapt to find-language-joint change. (compute-compiler): Export. * module/scripts/compile.scm (compile): Use compute-compiler to load compiler modules.
Diffstat (limited to 'module/scripts')
-rw-r--r--module/scripts/compile.scm16
1 files changed, 8 insertions, 8 deletions
diff --git a/module/scripts/compile.scm b/module/scripts/compile.scm
index 6440c4086..eadd38bf2 100644
--- a/module/scripts/compile.scm
+++ b/module/scripts/compile.scm
@@ -29,8 +29,8 @@
;;; Code:
(define-module (scripts compile)
- #:use-module ((system base language) #:select (lookup-language))
- #:use-module ((system base compile) #:select (compile-file
+ #:use-module ((system base compile) #:select (compute-compiler
+ compile-file
default-warning-level
default-optimization-level))
#:use-module (system base target)
@@ -250,12 +250,12 @@ Report bugs to <~A>.~%"
(when (assoc-ref options 'install-r7rs?)
(install-r7rs!))
- ;; Load FROM and TO before we have changed the load path. That way, when
- ;; cross-compiling Guile itself, we can be sure we're loading our own
- ;; language modules and not those of the Guile being compiled, which may
- ;; have incompatible .go files.
- (lookup-language from)
- (lookup-language to)
+ ;; Compute a compiler before changing the load path, for its side
+ ;; effects of loading compiler modules. That way, when
+ ;; cross-compiling Guile itself, we can be sure we're loading our
+ ;; own language modules and not those of the Guile being compiled,
+ ;; which may have incompatible .go files.
+ (compute-compiler from to optimization-level warning-level compile-opts)
(set! %load-path (append load-path %load-path))
(set! %load-should-auto-compile #f)