This is an automated email from the git hooks/post-receive script.

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 30493decab0 utils: Add target-wasm? procedure.
30493decab0 is described below

commit 30493decab03278b62989f9b50630e9f9b3b95cb
Author: Efraim Flashner <[email protected]>
AuthorDate: Mon Nov 16 10:06:24 2026 +0200

    utils: Add target-wasm? procedure.
    
    * guix/utils.scm (target-wasm?): New procedure.
    
    Merges: guix/guix#12589
    Signed-off-by: Efraim Flashner <[email protected]>
---
 guix/utils.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/guix/utils.scm b/guix/utils.scm
index 2f26b949686..64217ecf4fb 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2015 David Thompson <[email protected]>
 ;;; Copyright © 2017 Mathieu Othacehe <[email protected]>
 ;;; Copyright © 2018, 2020 Marius Bakke <[email protected]>
-;;; Copyright © 2020, 2021, 2024 Efraim Flashner <[email protected]>
+;;; Copyright © 2020, 2021, 2024, 2026 Efraim Flashner <[email protected]>
 ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <[email protected]>
 ;;; Copyright © 2021 Simon Tournier <[email protected]>
 ;;; Copyright © 2021 Chris Marusich <[email protected]>
@@ -103,6 +103,7 @@
             host-hurd64?
             host-x86-64?
             target-mingw?
+            target-wasm?
             target-x86-32?
             target-x86-64?
             target-x86?
@@ -794,6 +795,14 @@ function, use target-hurd64? or system-hurd64? instead."
        ;; are 64-bit.
        (string-suffix? "-mingw32" target)))
 
+(define* (target-wasm? #:optional (target (%current-target-system)))
+  "Is the architecture of TARGET a Wasm variant?"
+  (and target
+       ;; config.guess identifies the CPU as wasm32 or wasm64 as the
+       ;; 32-bit and 64-bit variants of Wasm (or WebAssembly).
+       (or (string-prefix? "wasm32" target)
+           (string-prefix? "wasm64" target))))
+
 (define* (target-x86-32? #:optional (target (or (%current-target-system)
                                                 (%current-system))))
   "Is the architecture of TARGET a variant of Intel's 32-bit architecture

Reply via email to