summaryrefslogtreecommitdiff
path: root/gnu/packages/llvm.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/llvm.scm')
-rw-r--r--gnu/packages/llvm.scm90
1 files changed, 72 insertions, 18 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 3bf019fa83..c380eba122 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -1,7 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 Dennis Mungai <dmngaie@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,7 +21,7 @@
(define-module (gnu packages llvm)
#:use-module (guix packages)
- #:use-module (guix licenses)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
@@ -28,6 +29,8 @@
#:use-module (gnu packages)
#:use-module (gnu packages gcc)
#:use-module (gnu packages bootstrap) ;glibc-dynamic-linker
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages libffi)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
#:use-module (gnu packages xml))
@@ -35,7 +38,7 @@
(define-public llvm
(package
(name "llvm")
- (version "3.6.2")
+ (version "3.8.1")
(source
(origin
(method url-fetch)
@@ -43,14 +46,21 @@
version "/llvm-" version ".src.tar.xz"))
(sha256
(base32
- "153vcvj8gvgwakzr4j0kndc0b7wn91c2g1vy2vg24s6spxcc23gn"))))
+ "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf"))))
(build-system cmake-build-system)
(native-inputs
- `(("python" ,python-wrapper)
+ `(("python" ,python-2) ;bytes->str conversion in clang>=3.7 needs python-2
("perl" ,perl)))
+ (inputs
+ `(("libffi" ,libffi)
+ ("zlib" ,zlib)))
(arguments
`(#:configure-flags '("-DCMAKE_SKIP_BUILD_RPATH=FALSE"
- "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE")))
+ "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
+ "-DLLVM_ENABLE_FFI:BOOL=TRUE")
+
+ ;; Don't use '-g' during the build, to save space.
+ #:build-type "Release"))
(home-page "http://www.llvm.org")
(synopsis "Optimizing compiler infrastructure")
(description
@@ -60,7 +70,7 @@ languages. It currently supports compilation of C and C++ programs, using
front-ends derived from GCC 4.0.1. A new front-end for the C family of
languages is in development. The compiler infrastructure includes mirror sets
of programming tools as well as libraries with equivalent functionality.")
- (license ncsa)))
+ (license license:ncsa)))
(define (clang-runtime-from-llvm llvm hash)
(package
@@ -78,8 +88,8 @@ of programming tools as well as libraries with equivalent functionality.")
`(("llvm" ,llvm)))
(arguments
`(;; Don't use '-g' during the build to save space.
- #:build-type "Release"))
-
+ #:build-type "Release"
+ #:tests? #f)) ; Tests require gtest
(home-page "http://compiler-rt.llvm.org")
(synopsis "Runtime library for Clang/LLVM")
(description
@@ -87,12 +97,13 @@ of programming tools as well as libraries with equivalent functionality.")
functions for C and C++ programs. It also provides header files that allow C
and C++ source code to interface with the \"sanitization\" passes of the clang
compiler. In LLVM this library is called \"compiler-rt\".")
- (license ncsa)
+ (license license:ncsa)
;; <http://compiler-rt.llvm.org/> doesn't list MIPS as supported.
(supported-systems (delete "mips64el-linux" %supported-systems))))
-(define (clang-from-llvm llvm clang-runtime hash)
+(define* (clang-from-llvm llvm clang-runtime hash
+ #:key (patches '("clang-libc-search-path.patch")))
(package
(name "clang")
(version (package-version llvm))
@@ -102,7 +113,7 @@ compiler. In LLVM this library is called \"compiler-rt\".")
(uri (string-append "http://llvm.org/releases/"
version "/cfe-" version ".src.tar.xz"))
(sha256 (base32 hash))
- (patches (search-patches "clang-libc-search-path.patch"))))
+ (patches (map search-patch patches))))
;; Using cmake allows us to treat llvm as an external library. There
;; doesn't seem to be any way to do this with clang's autotools-based
;; build system.
@@ -170,20 +181,63 @@ compiler. In LLVM this library is called \"compiler-rt\".")
Objective-C++ programming languages. It uses LLVM as its back end. The Clang
project includes the Clang front end, the Clang static analyzer, and several
code analysis tools.")
- (license ncsa)))
+ (license license:ncsa)))
(define-public clang-runtime
(clang-runtime-from-llvm
llvm
- "11qx8d3pbfqjaj2x207pvlvzihbs1z2xbw4crpz7aid6h1yz6bqg"))
+ "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d"))
(define-public clang
(clang-from-llvm llvm clang-runtime
+ "1prc72xmkgx8wrzmrr337776676nhsp1qd3mw2bvb22bzdnq7lsc"
+ #:patches '("clang-3.8-libc-search-path.patch")))
+
+(define-public llvm-3.7
+ (package (inherit llvm)
+ (version "3.7.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://llvm.org/releases/"
+ version "/llvm-" version ".src.tar.xz"))
+ (sha256
+ (base32
+ "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy"))))))
+
+(define-public clang-runtime-3.7
+ (clang-runtime-from-llvm
+ llvm-3.7
+ "10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx"))
+
+(define-public clang-3.7
+ (clang-from-llvm llvm-3.7 clang-runtime-3.7
+ "0x065d0w9b51xvdjxwfzjxng0gzpbx45fgiaxpap45ragi61dqjn"))
+
+(define-public llvm-3.6
+ (package (inherit llvm)
+ (version "3.6.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://llvm.org/releases/"
+ version "/llvm-" version ".src.tar.xz"))
+ (sha256
+ (base32
+ "153vcvj8gvgwakzr4j0kndc0b7wn91c2g1vy2vg24s6spxcc23gn"))))))
+
+(define-public clang-runtime-3.6
+ (clang-runtime-from-llvm
+ llvm-3.6
+ "11qx8d3pbfqjaj2x207pvlvzihbs1z2xbw4crpz7aid6h1yz6bqg"))
+
+(define-public clang-3.6
+ (clang-from-llvm llvm-3.6 clang-runtime-3.6
"1wwr8s6lzr324hv4s1k6na4j5zv6n9kdhi14s4kb9b13d93814df"))
(define-public llvm-3.5
(package (inherit llvm)
- (version "3.5.0")
+ (version "3.5.2")
(source
(origin
(method url-fetch)
@@ -191,13 +245,13 @@ code analysis tools.")
version "/llvm-" version ".src.tar.xz"))
(sha256
(base32
- "00swb43mzlvda8306arlg2jw7g6k3acwfccgf1k4c2pgd3rrkq98"))))))
+ "0xf5q17kkxsrm2gsi93h4pwlv663kji73r2g4asb97klsmb626a4"))))))
(define-public clang-runtime-3.5
(clang-runtime-from-llvm
llvm-3.5
- "0dl1kbrhz96djsxqr61iw5h788s7ncfpfb7aayixky1bhdaydcx4"))
+ "1hsdnzzdr5kglz6fnv3lcsjs222zjsy14y8ax9dy6zqysanplbal"))
(define-public clang-3.5
(clang-from-llvm llvm-3.5 clang-runtime-3.5
- "12yv3jwdjcbkrx7zjm8wh4jrvb59v8fdw4mnmz3zc1jb00p9k07w"))
+ "0846h8vn3zlc00jkmvrmy88gc6ql6014c02l4jv78fpvfigmgssg"))