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.scm88
1 files changed, 59 insertions, 29 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 13223fbb66..bb5a4a141c 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -3,9 +3,9 @@
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Dennis Mungai <dmngaie@gmail.com>
-;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
@@ -47,15 +47,15 @@
(define-public llvm
(package
(name "llvm")
- (version "6.0.1")
+ (version "7.0.1")
(source
(origin
(method url-fetch)
- (uri (string-append "http://llvm.org/releases/"
+ (uri (string-append "https://llvm.org/releases/"
version "/llvm-" version ".src.tar.xz"))
(sha256
(base32
- "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn"))))
+ "16s196wqzdw4pmri15hadzqgdi926zln3an2viwyq0kini6zr3d3"))))
(build-system cmake-build-system)
(native-inputs
`(("python" ,python-2) ;bytes->str conversion in clang>=3.7 needs python-2
@@ -95,21 +95,6 @@ languages is in development. The compiler infrastructure includes mirror sets
of programming tools as well as libraries with equivalent functionality.")
(license license:ncsa)))
-;; TODO: Build Mesa with LLVM 7 in the next staging cycle.
-;; TODO: Make LLVM 7 the default LLVM once Clang is also upgraded.
-(define-public llvm-7.0.1
- (package (inherit llvm)
- (name "llvm")
- (version "7.0.1")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "http://llvm.org/releases/"
- version "/llvm-" version ".src.tar.xz"))
- (sha256
- (base32
- "16s196wqzdw4pmri15hadzqgdi926zln3an2viwyq0kini6zr3d3"))))))
-
(define* (clang-runtime-from-llvm llvm hash
#:optional (patches '()))
(package
@@ -118,7 +103,7 @@ of programming tools as well as libraries with equivalent functionality.")
(source
(origin
(method url-fetch)
- (uri (string-append "http://llvm.org/releases/"
+ (uri (string-append "https://llvm.org/releases/"
version "/compiler-rt-" version ".src.tar.xz"))
(sha256 (base32 hash))
(patches (map search-patch patches))))
@@ -150,7 +135,7 @@ compiler. In LLVM this library is called \"compiler-rt\".")
(source
(origin
(method url-fetch)
- (uri (string-append "http://llvm.org/releases/"
+ (uri (string-append "https://llvm.org/releases/"
version "/cfe-" version ".src.tar.xz"))
(sha256 (base32 hash))
(patches (map search-patch patches))))
@@ -190,7 +175,7 @@ compiler. In LLVM this library is called \"compiler-rt\".")
(compiler-rt (assoc-ref inputs "clang-runtime")))
(case (string->number ,(version-major
(package-version clang-runtime)))
- ((6)
+ ((or 6 7)
;; Link to libclang_rt files from clang-runtime.
(substitute* "lib/Driver/ToolChain.cpp"
(("getDriver\\(\\)\\.ResourceDir")
@@ -274,13 +259,58 @@ project includes the Clang front end, the Clang static analyzer, and several
code analysis tools.")
(license license:ncsa)))
+(define-public libcxx
+ (package
+ (name "libcxx")
+ (version (package-version llvm))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://llvm.org/releases/"
+ version "/libcxx-" version ".src.tar.xz"))
+ (sha256
+ (base32
+ "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("clang" ,clang)
+ ("llvm" ,llvm)))
+ (home-page "https://libcxx.llvm.org")
+ (synopsis "C++ standard library")
+ (description
+ "This package provides an implementation of the C++ standard library for
+use with Clang, targeting C++11, C++14 and above.")
+ (license license:expat)))
+
(define-public clang-runtime
(clang-runtime-from-llvm
llvm
- "1fcr3jn24yr8lh36nc0c4ikli4744i2q9m1ik67p1jymwwaixkgl"))
+ "065ybd8fsc4h2hikbdyricj6pyv4r7r7kpcikhb2y5zf370xybkq"))
(define-public clang
(clang-from-llvm llvm clang-runtime
+ "067lwggnbg0w1dfrps790r5l6k8n5zwhlsw7zb6zvmfpwpfn4nx4"
+ #:patches '("clang-7.0-libc-search-path.patch")))
+
+(define-public llvm-6
+ (package
+ (inherit llvm)
+ (version "6.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://llvm.org/releases/"
+ version "/llvm-" version ".src.tar.xz"))
+ (sha256
+ (base32
+ "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn"))))))
+
+(define-public clang-runtime-6
+ (clang-runtime-from-llvm
+ llvm-6
+ "1fcr3jn24yr8lh36nc0c4ikli4744i2q9m1ik67p1jymwwaixkgl"))
+
+(define-public clang-6
+ (clang-from-llvm llvm-6 clang-runtime
"0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w"
#:patches '("clang-6.0-libc-search-path.patch")))
@@ -291,7 +321,7 @@ code analysis tools.")
(source
(origin
(method url-fetch)
- (uri (string-append "http://llvm.org/releases/"
+ (uri (string-append "https://llvm.org/releases/"
version "/llvm-" version ".src.tar.xz"))
(sha256
(base32
@@ -341,7 +371,7 @@ code analysis tools.")
(source
(origin
(method url-fetch)
- (uri (string-append "http://llvm.org/releases/"
+ (uri (string-append "https://llvm.org/releases/"
version "/llvm-" version ".src.tar.xz"))
(sha256
(base32
@@ -365,7 +395,7 @@ code analysis tools.")
(source
(origin
(method url-fetch)
- (uri (string-append "http://llvm.org/releases/"
+ (uri (string-append "https://llvm.org/releases/"
version "/llvm-" version ".src.tar.xz"))
(sha256
(base32
@@ -388,7 +418,7 @@ code analysis tools.")
(source
(origin
(method url-fetch)
- (uri (string-append "http://llvm.org/releases/"
+ (uri (string-append "https://llvm.org/releases/"
version "/llvm-" version ".src.tar.xz"))
(patches
(search-patches "llvm-3.5-fix-clang-build-with-gcc5.patch"))
@@ -511,7 +541,7 @@ SOURCE-FILES found in SOURCE-PACKAGE."
(description "This package allows to filter code through @code{clang-format}
to fix its formatting. @code{clang-format} is a tool that formats
C/C++/Obj-C code according to a set of style options, see
-@url{http://clang.llvm.org/docs/ClangFormatStyleOptions.html}.")))
+@url{https://clang.llvm.org/docs/ClangFormatStyleOptions.html}.")))
(define-public emacs-clang-rename
(package