1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-22 09:05:54 +02:00

gnu: Add libomp-rocm.

* gnu/packages/llvm.scm (libomp-rocm): New variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
David Elsing
2026-02-03 21:33:21 +01:00
committed by Ludovic Courtès
parent 091d8dafa4
commit a928423142
+37
View File
@@ -32,6 +32,7 @@
;;; Copyright © 2025 Liam Hupfer <liam@hpfr.net>
;;; Copyright © 2025 dan <i@dan.games>
;;; Copyright © 2026 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2026 David Elsing <david.elsing@posteo.net>
;;;
;;; 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