guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/09: gnu: llvm-for-rocm: Move to llvm.scm.


From: guix-commits
Subject: 01/09: gnu: llvm-for-rocm: Move to llvm.scm.
Date: Fri, 10 Sep 2021 11:31:24 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit e11830d36e557dd7ab48733c679267f238db597b
Author: Ludovic Courtès <ludovic.courtes@inria.fr>
AuthorDate: Thu Sep 9 11:58:47 2021 +0200

    gnu: llvm-for-rocm: Move to llvm.scm.
    
    This removes a cross-module top-level reference, which could lead to
    build errors when importing (gnu packages rocm) in another module.
    
    * gnu/packages/rocm.scm (llvm-for-rocm): Move to...
    * gnu/packages/llvm.scm (llvm-for-rocm): ... here.
---
 gnu/packages/llvm.scm | 38 ++++++++++++++++++++++++++++++++++++++
 gnu/packages/rocm.scm | 37 +------------------------------------
 2 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 4394194..3805f4e 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -882,6 +883,43 @@ of programming tools as well as libraries with equivalent 
functionality.")
 (define-public clang clang-9)
 (define-public clang-toolchain clang-toolchain-9)
 
+(define-public llvm-for-rocm
+  (package
+    ;; Actually based on LLVM 13 as of v4.3, but llvm-12 works just fine.
+    (inherit llvm-12)
+    (name "llvm-for-rocm")
+    (version "4.3.0")                         ;this must match '%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="))))
+    (properties `((hidden? . #t)
+                  ,@(package-properties llvm-12)))))
+
+
 (define-public lld
   (package
     (name "lld")
diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm
index 05dbb00..9a015d2 100644
--- a/gnu/packages/rocm.scm
+++ b/gnu/packages/rocm.scm
@@ -1,4 +1,4 @@
-;;;
+;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
 ;;;
 ;;; This program is free software; you can redistribute it and/or modify it
@@ -56,41 +56,6 @@
 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=")))))))
-
 (define-public rocm-device-libs
   (package
     (name "rocm-device-libs")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]