diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-26 18:35:14 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-26 18:35:14 +0200 |
commit | 17dddeeee560527a8f30d37761949d658056cb09 (patch) | |
tree | 15b0b19c55787f556eb9b42c28d173bddc5435db /guix/quirks.scm | |
parent | 331a09654eb7e9f6212b7e8469077fa7393e8b11 (diff) | |
parent | 6a9581741e4ee81226aeb2f1c997df76670a6aab (diff) | |
download | guix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar guix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/quirks.scm')
-rw-r--r-- | guix/quirks.scm | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/guix/quirks.scm b/guix/quirks.scm index d292f4e932..1cffe971fc 100644 --- a/guix/quirks.scm +++ b/guix/quirks.scm @@ -139,18 +139,30 @@ corresponds to the given Guix COMMIT, a SHA1 hexadecimal string." (define (accesses-guile-2.2-optimization-options? source commit) (catch 'system-error (lambda () - (match (call-with-input-file - (string-append source "/guix/build/compile.scm") - read) - (('define-module ('guix 'build 'compile) - _ ... - #:use-module ('language 'tree-il 'optimize) - #:use-module ('language 'cps 'optimize) - #:export ('%default-optimizations - '%lightweight-optimizations - 'compile-files)) - #t) - (_ #f))) + (call-with-input-file (string-append source + "/guix/build/compile.scm") + (lambda (port) + (match (read port) + (('define-module ('guix 'build 'compile) + _ ... + #:use-module ('language 'tree-il 'optimize) + #:use-module ('language 'cps 'optimize) + #:export ('%default-optimizations + '%lightweight-optimizations + 'compile-files)) + #t) + (_ + ;; Before v1.0.0 (ca. Dec. 2018), the 'use-modules' form + ;; would show up in a subsequent 'cond-expand' clause. + ;; See <https://bugs.gnu.org/42519>. + (match (read port) + (('cond-expand + ('guile-2.2 ('use-modules ('language 'tree-il 'optimize) + _ ...)) + _ ...) + #t) + (_ + #f))))))) (const #f))) (define (build-with-guile-2.2 source) |