guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 9c4914aaf8963390e495065c4689e3d2ae5e3f05
Author: David Elsing <[email protected]>
AuthorDate: Tue Feb 3 21:33:21 2026 +0100

    gnu: Add rocm-toolchain.
    
    Adapted from the Guix-HPC channel 
(https://gitlab.inria.fr/guix-hpc/guix-hpc).
    
    * gnu/packages/llvm.scm (rocm-toolchain): New variable.
    
    Signed-off-by: Ludovic Courtès <[email protected]>
---
 gnu/packages/llvm.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index b4b8e26f6f..0e13d69370 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -2167,6 +2167,43 @@ the host.")
     ;; Apache license 2.0 with LLVM exception
     (license license:asl2.0)))
 
+(define-public rocm-toolchain
+  (package
+    (inherit clang-rocm-toolchain)
+    (name "rocm-toolchain")
+    (inputs
+     (modify-inputs (package-inputs clang-rocm-toolchain)
+       (append lld-wrapper-rocm
+               offload-rocm
+               rocr-runtime
+               rocm-device-libs)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments clang-rocm-toolchain)
+       ((#:builder _)
+        #~(begin
+            (use-modules (ice-9 match)
+                         (guix build union))
+
+            (match %build-inputs
+              (((names . directories) ...)
+               (union-build #$output directories)))
+
+            (union-build #$output:debug
+                         (list #$(this-package-input "libc-debug")))
+            (union-build #$output:static
+                         (list #$(this-package-input "libc-static")))))))
+    (native-search-paths
+     (append (package-native-search-paths clang-rocm-toolchain)
+             (list (search-path-specification
+                     (variable "HIP_DEVICE_LIB_PATH")
+                     (files '("amdgcn/bitcode"))))))
+    (synopsis "Clang-based ROCm toolchain for C/C++ development")
+    (description
+     "This package provides a complete ROCm toolchain for C/C++ development to
+be installed in user profiles.  This includes Clang, as well as libc (headers
+and binaries, plus debugging symbols in the @code{debug} output), Binutils,
+the ROCm device libraries, and the ROCr runtime.")))
+
 
 
 (define-public include-what-you-use

Reply via email to