diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-01-25 22:07:13 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-01-25 22:07:13 -0500 |
commit | 1a5302435ff0d2822b823f5a6fe01faa7a85c629 (patch) | |
tree | ac7810c88b560532f22d2bab2e59609cd7305c21 /guix/build/compile.scm | |
parent | 3ff2ac4980dacf10087e4b42bd9fbc490591900c (diff) | |
parent | 070b8a893febd6e7d8b2b7c8c4dcebacf7845aa9 (diff) |
Merge branch 'master' into staging.
With "conflicts" solved (all in favor of master except git) in:
gnu/local.mk
gnu/packages/databases.scm
gnu/packages/glib.scm
gnu/packages/gnome.scm
gnu/packages/gnupg.scm
gnu/packages/gnuzilla.scm
gnu/packages/graphics.scm
gnu/packages/gstreamer.scm
gnu/packages/gtk.scm
gnu/packages/linux.scm
gnu/packages/machine-learning.scm
gnu/packages/networking.scm
gnu/packages/polkit.scm
gnu/packages/pulseaudio.scm
gnu/packages/rpc.scm
gnu/packages/rust.scm
gnu/packages/version-control.scm
gnu/packages/w3m.scm
Diffstat (limited to 'guix/build/compile.scm')
-rw-r--r-- | guix/build/compile.scm | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/guix/build/compile.scm b/guix/build/compile.scm index b86ec3b743..5b27b55d02 100644 --- a/guix/build/compile.scm +++ b/guix/build/compile.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013-2014, 2016-2020, 2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -37,6 +37,21 @@ ;;; ;;; Code: +(define (clear-keyword-arguments keywords args) + "Set to #f the value associated with each of the KEYWORDS in ARGS." + (let loop ((args args) + (result '())) + (match args + (() + (reverse result)) + (((? keyword? kw) arg . rest) + (loop rest + (if (memq kw keywords) + (cons* #f kw result) + (cons* arg kw result)))) + ((head . tail) + (loop tail (cons head result)))))) + (define optimizations-for-level (or (and=> (false-if-exception (resolve-interface '(system base optimize))) @@ -60,9 +75,18 @@ (loop rest `(#f ,kw ,@result)))))) (lambda (level) - (if (<= level 1) - %lightweight-optimizations - %default-optimizations))))) + ;; In the upcoming Guile 3.0.8, .go files include code of their + ;; inlinable exports and free variables are resolved at compile time + ;; (both are enabled at -O1) to permit cross-module inlining + ;; (enabled at -O2). Unfortunately, this currently leads to + ;; non-reproducible and more expensive builds, so we turn it off + ;; here: + ;; <https://wingolog.org/archives/2021/05/13/cross-module-inlining-in-guile>. + (clear-keyword-arguments '(#:inlinable-exports? #:resolve-free-vars? + #:cross-module-inlining?) + (if (<= level 1) + %lightweight-optimizations + %default-optimizations)))))) (define (supported-warning-type? type) "Return true if TYPE, a symbol, denotes a supported warning type." |