mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
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.
This commit is contained in:
parent
44ad8fbde5
commit
cb8cabe85f
3 changed files with 25 additions and 28 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue