diff options
| author | David Elsing <david.elsing@posteo.net> | 2026-02-03 21:33:21 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-02-10 23:46:33 +0100 |
| commit | dc52bfce99673366f06b633f8b677b2c15905366 (patch) | |
| tree | 11c89723889fef5eb4fcd488d5b6c8657bad3500 /gnu/packages/llvm.scm | |
| parent | 838a5a46ce5dd19359ff07c7275dfa74ab04fcdb (diff) | |
gnu: Add offload-rocm.
* gnu/packages/llvm.scm (offload-rocm): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/llvm.scm')
| -rw-r--r-- | gnu/packages/llvm.scm | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index e8fbbed4ed9..b4b8e26f6f4 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm | |||
| @@ -2121,6 +2121,52 @@ existing compilers together.") | |||
| 2121 | (define-public clang-rocm-toolchain | 2121 | (define-public clang-rocm-toolchain |
| 2122 | (make-clang-toolchain clang-rocm libomp-rocm)) | 2122 | (make-clang-toolchain clang-rocm libomp-rocm)) |
| 2123 | 2123 | ||
| 2124 | (define-public offload-rocm | ||
| 2125 | (package | ||
| 2126 | (name "offload-rocm") | ||
| 2127 | (version (package-version llvm-rocm)) | ||
| 2128 | (source (package-source llvm-rocm)) | ||
| 2129 | (build-system cmake-build-system) | ||
| 2130 | (arguments | ||
| 2131 | (list | ||
| 2132 | #:configure-flags | ||
| 2133 | #~(list | ||
| 2134 | "-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld" | ||
| 2135 | "-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld") | ||
| 2136 | #:phases | ||
| 2137 | #~(modify-phases %standard-phases | ||
| 2138 | (add-after 'unpack 'chdir | ||
| 2139 | (lambda _ | ||
| 2140 | (chdir "offload"))) | ||
| 2141 | (add-after 'chdir 'libffi-dynamic-link | ||
| 2142 | (lambda _ | ||
| 2143 | (substitute* "plugins-nextgen/host/CMakeLists.txt" | ||
| 2144 | (("if\\(FFI_STATIC.*") "if(FALSE)\n")))) | ||
| 2145 | (add-after 'install 'install-license | ||
| 2146 | (lambda _ | ||
| 2147 | (install-file "../LICENSE.TXT" | ||
| 2148 | (string-append #$output "/share/doc/" | ||
| 2149 | #$name "-" #$version))))) | ||
| 2150 | ;; XXX: Tests cannot be built with ROCm version 7.1.1: | ||
| 2151 | ;; https://github.com/ROCm/llvm-project/blob/27682a16360e33e37c4f3cc6adf9a620733f8fe1/offload/CMakeLists.txt#L443 | ||
| 2152 | #:tests? #f)) | ||
| 2153 | (native-inputs | ||
| 2154 | (list clang-rocm-toolchain | ||
| 2155 | lld-wrapper-rocm | ||
| 2156 | python)) | ||
| 2157 | (inputs | ||
| 2158 | (list libffi | ||
| 2159 | libomp-rocm | ||
| 2160 | rocm-device-libs | ||
| 2161 | rocr-runtime)) | ||
| 2162 | (home-page "https://github.com/ROCm/llvm-project/") | ||
| 2163 | (synopsis "LLVM offloading library") | ||
| 2164 | (description "This LLVM component provides tooling, runtimes and APIs for | ||
| 2165 | executing code on accelerators which may have a different architecture than | ||
| 2166 | the host.") | ||
| 2167 | ;; Apache license 2.0 with LLVM exception | ||
| 2168 | (license license:asl2.0))) | ||
| 2169 | |||
| 2124 | 2170 | ||
| 2125 | 2171 | ||
| 2126 | (define-public include-what-you-use | 2172 | (define-public include-what-you-use |
