guix_mirror_bot pushed a commit to branch master
in repository guix.

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

    gnu: Add libomp-rocm.
    
    * gnu/packages/llvm.scm (libomp-rocm): 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 03f0c20c73..776aa74db0 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -32,6 +32,7 @@
 ;;; Copyright © 2025 Liam Hupfer <[email protected]>
 ;;; Copyright © 2025 dan <[email protected]>
 ;;; Copyright © 2026 Sharlatan Hellseher <[email protected]>
+;;; Copyright © 2026 David Elsing <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2081,6 +2082,42 @@ existing compilers together.")
     (inherit (make-lld-wrapper lld-rocm))
     (name "lld-wrapper-rocm")))
 
+(define-public libomp-rocm
+  (package
+    (inherit libomp-20)
+    (name "libomp-rocm")
+    (version (package-version llvm-rocm))
+    (source (package-source llvm-rocm))
+    (arguments
+     (substitute-keyword-arguments (package-arguments libomp-20)
+       ((#:configure-flags flags '())
+        #~(cons
+           (string-append "-DOPENMP_LIT_ARGS="
+                          "-sv --show-unsupported --show-xfail"
+                          ;; This test fails
+                          " --filter-out tasking/task_teams_stress_test.cpp")
+           #$flags))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-after 'unpack 'fix-lit
+              (lambda _
+                (substitute* "openmp/cmake/OpenMPTesting.cmake"
+                  (((string-append "COMMAND \\$\\{Python3_EXECUTABLE\\}"
+                                   " \\$\\{OPENMP_LLVM_LIT_EXECUTABLE\\}"))
+                   "COMMAND ${OPENMP_LLVM_LIT_EXECUTABLE}"))
+                (substitute* "openmp/runtime/test/lit.cfg"
+                  (("config\\.name =.*" orig)
+                   (string-append
+                    orig
+                    "\nconfig.environment['C_INCLUDE_PATH']"
+                    " = os.environ['C_INCLUDE_PATH']\n"
+                    "config.environment['CPLUS_INCLUDE_PATH']"
+                    " = os.environ['CPLUS_INCLUDE_PATH']\n")))))))))
+    (native-inputs
+     (modify-inputs (package-native-inputs libomp-20)
+       (replace "clang" clang-rocm)
+       (replace "llvm" llvm-rocm)))))
+
 
 
 (define-public include-what-you-use

Reply via email to