2017-03-18 20:48:27 +00:00
|
|
|
{ newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
|
2017-02-18 19:53:46 +00:00
|
|
|
let
|
2017-03-18 20:48:27 +00:00
|
|
|
callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; });
|
2017-02-18 19:53:46 +00:00
|
|
|
|
2017-02-19 20:33:47 +00:00
|
|
|
release_version = "4.0.0";
|
2017-03-13 19:54:39 +00:00
|
|
|
version = release_version; # differentiating these is important for rc's
|
2017-02-18 19:53:46 +00:00
|
|
|
|
2017-02-19 20:33:47 +00:00
|
|
|
fetch = name: sha256: fetchurl {
|
2017-03-13 19:54:39 +00:00
|
|
|
url = "http://llvm.org/releases/${release_version}/${name}-${version}.src.tar.xz";
|
2017-02-18 19:53:46 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2017-03-13 19:54:39 +00:00
|
|
|
compiler-rt_src = fetch "compiler-rt" "059ipqq27gd928ay06f1ck3vw6y5h5z4zd766x8k0k7jpqimpwnk";
|
|
|
|
clang-tools-extra_src = fetch "clang-tools-extra" "16bwckgcxfn56mbqjlxi7fxja0zm9hjfa6s3ncm3dz98n5zd7ds1";
|
2017-02-18 19:53:46 +00:00
|
|
|
|
|
|
|
self = {
|
|
|
|
llvm = callPackage ./llvm.nix {
|
|
|
|
inherit compiler-rt_src stdenv;
|
|
|
|
};
|
|
|
|
|
|
|
|
clang-unwrapped = callPackage ./clang {
|
|
|
|
inherit clang-tools-extra_src stdenv;
|
|
|
|
};
|
|
|
|
|
|
|
|
clang = wrapCC self.clang-unwrapped;
|
|
|
|
|
2017-04-29 02:30:55 +01:00
|
|
|
openmp = callPackage ./openmp.nix {};
|
|
|
|
|
2017-02-18 19:53:46 +00:00
|
|
|
libcxxClang = ccWrapperFun {
|
|
|
|
cc = self.clang-unwrapped;
|
|
|
|
isClang = true;
|
|
|
|
inherit (self) stdenv;
|
|
|
|
/* FIXME is this right? */
|
|
|
|
inherit (stdenv.cc) libc nativeTools nativeLibc;
|
|
|
|
extraPackages = [ self.libcxx self.libcxxabi ];
|
|
|
|
};
|
|
|
|
|
|
|
|
stdenv = overrideCC stdenv self.clang;
|
|
|
|
|
|
|
|
libcxxStdenv = overrideCC stdenv self.libcxxClang;
|
|
|
|
|
|
|
|
lld = callPackage ./lld.nix {};
|
|
|
|
|
|
|
|
lldb = callPackage ./lldb.nix {};
|
|
|
|
|
|
|
|
libcxx = callPackage ./libc++ {};
|
|
|
|
|
|
|
|
libcxxabi = callPackage ./libc++abi.nix {};
|
|
|
|
};
|
|
|
|
in self
|