aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/llvm.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/llvm.scm')
-rw-r--r--gnu/packages/llvm.scm146
1 files changed, 88 insertions, 58 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 6e12c3ebde..5a2f411eb2 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -485,7 +485,7 @@ code analysis tools.")
"znver3")
'())))))
-(define (make-clang-toolchain clang)
+(define* (make-clang-toolchain clang #:optional (libomp libomp-13))
(package
(name (string-append (package-name clang) "-toolchain"))
(version (package-version clang))
@@ -543,10 +543,10 @@ output), and Binutils.")
("libc-static" ,glibc "static")))))
(define %llvm-monorepo-hashes
- '(("14.0.5" . "1hdv020x4k5fp38hik3bxz8k2sr3gnyj9iym3yhjhwygzgwgxjh9")))
+ '(("14.0.6" . "14f8nlvnmdkp9a9a79wv67jbmafvabczhah8rwnqrgd5g3hfxxxx")))
(define %llvm-patches
- '(("14.0.5" . ("clang-14.0-libc-search-path.patch"))))
+ '(("14.0.6" . ("clang-14.0-libc-search-path.patch"))))
(define (llvm-monorepo version)
(origin
@@ -561,7 +561,7 @@ output), and Binutils.")
(define-public llvm-14
(package
(name "llvm")
- (version "14.0.5")
+ (version "14.0.6")
(source (llvm-monorepo version))
(build-system cmake-build-system)
(outputs '("out" "opt-viewer"))
@@ -649,7 +649,7 @@ of programming tools as well as libraries with equivalent functionality.")
(package-version llvm-14)))
(sha256
(base32
- "1p9y5fbcw3ynb79nzyadirwdla03bq38k6d9nhv9x8z2q4ypsga4"))))))
+ "0rhq4wkmvr369nkk059skzzw7jx6qhzqhmiwmqg4sp66avzviwvw"))))))
(package
(inherit template)
(arguments
@@ -660,8 +660,50 @@ of programming tools as well as libraries with equivalent functionality.")
(lambda _
(chdir "clang"))))))))))
+(define-public libomp-14
+ (package
+ (name "libomp")
+ (version "14.0.6")
+ (source (origin
+ (method url-fetch)
+ (uri (llvm-uri "openmp" version))
+ (sha256
+ (base32
+ "07zby3gwy5c8jssabrhjk3nsxlwipnm6sk4dsvck1l5d0br1ywsg"))
+ (file-name (string-append "libomp-" version ".tar.xz"))))
+ (build-system cmake-build-system)
+ ;; XXX: Note this gets built with GCC because building with Clang itself
+ ;; fails (missing <atomic>, even when libcxx is added as an input.)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DLIBOMP_USE_HWLOC=ON"
+ "-DOPENMP_TEST_C_COMPILER=clang"
+ "-DOPENMP_TEST_CXX_COMPILER=clang++")
+ #:test-target "check-libomp"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir-to-source-and-install-license
+ (lambda _
+ (chdir #$(string-append "../openmp-" version ".src"))
+ (install-file "LICENSE.TXT"
+ (string-append #$output "/share/doc")))))))
+ (native-inputs
+ (list clang-14 llvm-14 perl pkg-config python))
+ (inputs
+ (list `(,hwloc "lib")))
+ (home-page "https://openmp.llvm.org")
+ (synopsis "OpenMP run-time support library")
+ (description
+ "This package provides the run-time support library developed by the LLVM
+project for the OpenMP multi-theaded programming extension. This package
+notably provides @file{libgomp.so}, which is has a binary interface compatible
+with that of libgomp, the GNU Offloading and Multi Processing Library.")
+ (properties `((release-monitoring-url . ,%llvm-release-monitoring-url)
+ (upstream-name . "openmp")))
+ (license license:expat)))
+
(define-public clang-toolchain-14
- (make-clang-toolchain clang-14))
+ (make-clang-toolchain clang-14 libomp-14))
(define-public llvm-13
(package
@@ -699,6 +741,31 @@ of programming tools as well as libraries with equivalent functionality.")
(base32
"1l4jjdqfl9hrh0fwzv27hc263zc6x61h09vs4ni3yla8i1cwhayc")))))
+(define-public libomp-13
+ (package
+ (inherit libomp-14)
+ (version "13.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (llvm-uri "openmp" version))
+ (sha256
+ (base32
+ "0kvbr4j6ldpssiv7chgqra5y77n7jwbyxlwcl7z32v31f49jcybb"))
+ (file-name (string-append "libomp-" version ".tar.xz"))))
+ (arguments
+ '(#:configure-flags '("-DLIBOMP_USE_HWLOC=ON"
+ "-DOPENMP_TEST_C_COMPILER=clang"
+ "-DOPENMP_TEST_CXX_COMPILER=clang++"
+
+ ;; Work around faulty target detection, fixed in 14:
+ ;; https://github.com/llvm/llvm-project/issues/52910
+ "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF")
+ #:test-target "check-libomp"))
+ (native-inputs
+ (modify-inputs (package-native-inputs libomp-14)
+ (replace "clang" clang-13)
+ (replace "llvm" llvm-13)))))
+
(define-public clang-toolchain-13
(make-clang-toolchain clang-13))
@@ -912,24 +979,25 @@ of programming tools as well as libraries with equivalent functionality.")
(define-public llvm-8
(package
(inherit llvm-9)
- (version "8.0.0")
+ (version "8.0.1")
(source (origin
(method url-fetch)
(uri (llvm-uri "llvm" version))
(sha256
(base32
- "0k124sxkfhfi1rca6kzkdraf4axhx99x3cw2rk55056628dvwwl8"))))
+ "1rvm5gqp5v8hfn17kqws3zhk94w4kxndal12bqa0y57p09nply24"))
+ (patches (search-patches "llvm-8-fix-build-with-gcc-10.patch"))))
(license license:ncsa)))
(define-public clang-runtime-8
(clang-runtime-from-llvm
llvm-8
- "1c919wsm17xnv7lr8bhpq2wkq8113lzlw6hzhfr737j59x3wfddl"
+ "0dqqf8f930l8gag4d9qjgn1n0pj0nbv2anviqqhdi1rkhas8z0hi"
'("clang-runtime-9-libsanitizer-mode-field.patch")))
(define-public clang-8
(clang-from-llvm llvm-8 clang-runtime-8
- "0svk1f70hvpwrjp6x5i9kqwrqwxnmcrw5s7f4cxyd100mdd12k08"
+ "0ihnbdl058gvl2wdy45p5am55bq8ifx8m9mhcsgj9ax8yxlzvvvh"
#:patches '("clang-8.0-libc-search-path.patch")))
(define-public clang-toolchain-8
@@ -1035,7 +1103,8 @@ of programming tools as well as libraries with equivalent functionality.")
(uri (llvm-uri "llvm" version))
(sha256
(base32
- "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf"))))))
+ "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf"))
+ (patches (search-patches "llvm-3.x.1-fix-build-with-gcc.patch"))))))
(define-public clang-runtime-3.8
(clang-runtime-from-llvm
@@ -1059,7 +1128,8 @@ of programming tools as well as libraries with equivalent functionality.")
(uri (llvm-uri "llvm" version))
(sha256
(base32
- "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy"))))))
+ "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy"))
+ (patches (search-patches "llvm-3.x.1-fix-build-with-gcc.patch"))))))
(define-public clang-runtime-3.7
(clang-runtime-from-llvm
@@ -1067,7 +1137,8 @@ of programming tools as well as libraries with equivalent functionality.")
"10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx"
'("clang-runtime-asan-build-fixes.patch"
"clang-runtime-3.8-libsanitizer-mode-field.patch"
- "clang-3.5-libsanitizer-ustat-fix.patch")))
+ "clang-3.5-libsanitizer-ustat-fix.patch"
+ "clang-runtime-3.7-fix-build-with-python3.patch")))
(define-public clang-3.7
(clang-from-llvm llvm-3.7 clang-runtime-3.7
@@ -1158,14 +1229,9 @@ of programming tools as well as libraries with equivalent functionality.")
(search-patches "llvm-roc-5.0.0-linkdl.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")))))
+ (substitute-keyword-arguments (package-arguments llvm-14)
((#:configure-flags flags)
- ''("-DLLVM_ENABLE_PROJECTS=llvm;clang;lld"
+ #~(list"-DLLVM_ENABLE_PROJECTS=llvm;clang;lld"
"-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86"
"-DCMAKE_SKIP_BUILD_RPATH=FALSE"
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
@@ -1207,7 +1273,7 @@ of programming tools as well as libraries with equivalent functionality.")
(define-public lld-14
(package
(name "lld")
- (version "14.0.5")
+ (version "14.0.6")
(source (llvm-monorepo version))
(build-system cmake-build-system)
(inputs
@@ -1516,43 +1582,7 @@ requirements according to version 1.1 of the OpenCL specification.")
;; Apache license 2.0 with LLVM exception
(license license:asl2.0)))
-(define-public libomp
- (package
- (name "libomp")
- (version "13.0.1")
- (source (origin
- (method url-fetch)
- (uri (llvm-uri "openmp" version))
- (sha256
- (base32
- "0kvbr4j6ldpssiv7chgqra5y77n7jwbyxlwcl7z32v31f49jcybb"))
- (file-name (string-append "libomp-" version ".tar.xz"))))
- (build-system cmake-build-system)
- ;; XXX: Note this gets built with GCC because building with Clang itself
- ;; fails (missing <atomic>, even when libcxx is added as an input.)
- (arguments
- '(#:configure-flags '("-DLIBOMP_USE_HWLOC=ON"
- "-DOPENMP_TEST_C_COMPILER=clang"
- "-DOPENMP_TEST_CXX_COMPILER=clang++"
-
- ;; Work around faulty target detection, fixed in 14:
- ;; https://github.com/llvm/llvm-project/issues/52910
- "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF")
- #:test-target "check-libomp"))
- (native-inputs
- (list clang llvm perl pkg-config python))
- (inputs
- (list `(,hwloc "lib")))
- (home-page "https://openmp.llvm.org")
- (synopsis "OpenMP run-time support library")
- (description
- "This package provides the run-time support library developed by the LLVM
-project for the OpenMP multi-theaded programming extension. This package
-notably provides @file{libgomp.so}, which is has a binary interface compatible
-with that of libgomp, the GNU Offloading and Multi Processing Library.")
- (properties `((release-monitoring-url . ,%llvm-release-monitoring-url)
- (upstream-name . "openmp")))
- (license license:expat)))
+(define-public libomp libomp-13)
(define-public python-llvmlite
(package