summary refs log tree commit diff
path: root/gnu/packages/llvm.scm
diff options
context:
space:
mode:
authorGreg Hogan <code@greghogan.com>2022-02-03 20:47:35 +0000
committerLudovic Courtès <ludo@gnu.org>2022-02-10 23:23:00 +0100
commitd76cfc92dacd139fa565878a9a8e610c552094ef (patch)
tree6610082268ef9e3b7fb83419299165d947f28f32 /gnu/packages/llvm.scm
parented26d2ec6ce18851b49d17cf77dc71c79e760ed4 (diff)
downloadguix-d76cfc92dacd139fa565878a9a8e610c552094ef.tar.gz
gnu: LLVM: Support release candidates as version.
* gnu/packages/llvm.scm (llvm-uri, clang-from-llvm):
Support release candidates as version.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/llvm.scm')
-rw-r--r--gnu/packages/llvm.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 0b7800734c..b6d52402a8 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -100,8 +100,10 @@ as \"x86_64-linux\"."
              ("i586"        => "X86"))))
 
 (define (llvm-uri component version)
+  ;; LLVM release candidate file names are formatted 'tool-A.B.C-rcN/tool-A.B.CrcN.src.tar.xz'
+  ;; so we specify the version as A.B.C-rcN and delete the hyphen when referencing the file name.
   (string-append "https://github.com/llvm/llvm-project/releases/download"
-                 "/llvmorg-" version "/" component "-" version ".src.tar.xz"))
+                 "/llvmorg-" version "/" component "-" (string-delete #\- version) ".src.tar.xz"))
 
 (define %llvm-release-monitoring-url
   "https://github.com/llvm/llvm-project/releases")
@@ -224,7 +226,7 @@ given PATCHES.  When TOOLS-EXTRA is given, it must point to the
                                 (invoke "tar" "xf" extra)
                                 (rename-file ,(string-append
                                                "clang-tools-extra-"
-                                               (package-version llvm)
+                                               (string-delete #\- (package-version llvm))
                                                ".src")
                                              "tools/extra")
                                 #t)))