diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2021-08-06 08:18:26 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2021-08-08 16:47:55 +0200 |
commit | c5ee2cf72a72624eff4dfbdf4670851c6075191e (patch) | |
tree | 1e3105ed65a0737a62ce68bfc156b23d24d29c95 /gnu/packages/rocm.scm | |
parent | df90cb1d5c82cc83a305f6323f867f14e30ce240 (diff) | |
download | guix-c5ee2cf72a72624eff4dfbdf4670851c6075191e.tar guix-c5ee2cf72a72624eff4dfbdf4670851c6075191e.tar.gz |
gnu: Add llvm-for-rocm.
* gnu/packages/rocm.scm (llvm-for-rocm): New variable.
* gnu/packages/patches/llvm-roc-3.0.0-add_libraries.patch,
gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch,
gnu/packages/patches/llvm-roc-4.2.0-add_Object.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/rocm.scm')
-rw-r--r-- | gnu/packages/rocm.scm | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm index b04eb8050e..17685c7bcb 100644 --- a/gnu/packages/rocm.scm +++ b/gnu/packages/rocm.scm @@ -55,3 +55,38 @@ (description "ROCm cmake modules provides cmake modules for common build tasks needed for the ROCM software stack.") (license license:ncsa))) + +(define-public llvm-for-rocm + (hidden-package + (package + ;; Actually based on LLVM 13 as of v4.3, but llvm-12 works just fine. + (inherit llvm-12) + (name "llvm-for-rocm") + (version %rocm-version) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/RadeonOpenCompute/llvm-project.git") + (commit (string-append "rocm-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0p75nr1qpmy6crymdax5hm40wkimman4lnglz4x5cnbiqindya7s")) + (patches + (search-patches "llvm-roc-4.2.0-add_Object.patch" + "llvm-roc-3.0.0-add_libraries.patch" + "llvm-roc-4.0.0-remove-isystem-usr-include.patch")))) + (arguments + (substitute-keyword-arguments (package-arguments llvm-12) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "llvm"))))) + ((#:configure-flags flags) + ''("-DLLVM_ENABLE_PROJECTS=llvm;clang;lld" + "-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86" + "-DCMAKE_SKIP_BUILD_RPATH=FALSE" + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE" + "-DBUILD_SHARED_LIBS:BOOL=TRUE" + "-DLLVM_VERSION_SUFFIX="))))))) |