2016-10-25 16:29:40 +02:00
|
|
|
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }:
|
2016-03-09 01:05:46 +01:00
|
|
|
let
|
|
|
|
callPackage = newScope (self // { inherit stdenv isl version fetch; });
|
|
|
|
|
2016-08-30 20:56:01 +02:00
|
|
|
version = "3.8.1";
|
2016-03-09 01:05:46 +01:00
|
|
|
|
|
|
|
fetch = fetch_v version;
|
|
|
|
fetch_v = ver: name: sha256: fetchurl {
|
|
|
|
url = "http://llvm.org/releases/${ver}/${name}-${ver}.src.tar.xz";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2016-08-30 20:56:01 +02:00
|
|
|
compiler-rt_src = fetch "compiler-rt" "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d";
|
|
|
|
clang-tools-extra_src = fetch "clang-tools-extra" "15n39r4ssphpaq4a0wzyjm7ilwxb0bch6nrapy8c5s8d49h5qjk6";
|
2016-03-09 01:05:46 +01: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;
|
|
|
|
|
2016-10-25 16:29:40 +02: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 ];
|
|
|
|
};
|
|
|
|
|
2016-03-09 01:05:46 +01:00
|
|
|
stdenv = overrideCC stdenv self.clang;
|
|
|
|
|
2016-10-25 16:29:40 +02:00
|
|
|
libcxxStdenv = overrideCC stdenv self.libcxxClang;
|
|
|
|
|
2016-03-09 01:05:46 +01:00
|
|
|
lldb = callPackage ./lldb.nix {};
|
|
|
|
|
|
|
|
libcxx = callPackage ./libc++ {};
|
|
|
|
|
|
|
|
libcxxabi = callPackage ./libc++abi.nix {};
|
|
|
|
};
|
|
|
|
in self
|