diff options
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r-- | pkgs/development/compilers/llvm/3.7/default.nix | 30 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/3.8/default.nix | 29 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/3.9/default.nix | 29 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/4/default.nix | 24 |
4 files changed, 85 insertions, 27 deletions
diff --git a/pkgs/development/compilers/llvm/3.7/default.nix b/pkgs/development/compilers/llvm/3.7/default.nix index b7155defb437..432443e1a89a 100644 --- a/pkgs/development/compilers/llvm/3.7/default.nix +++ b/pkgs/development/compilers/llvm/3.7/default.nix @@ -1,4 +1,7 @@ -{ newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }: +{ newScope, stdenv, libstdcxxHook, cmake, libxml2, python2, isl, fetchurl +, overrideCC, wrapCC, ccWrapperFun, darwin +}: + let callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl version fetch; }); @@ -22,20 +25,35 @@ let inherit clang-tools-extra_src stdenv; }; - clang = wrapCC self.clang-unwrapped; + clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang; + + libstdcxxClang = ccWrapperFun { + cc = self.clang-unwrapped; + /* FIXME is this right? */ + inherit (stdenv.cc) libc nativeTools nativeLibc; + extraPackages = [ libstdcxxHook ]; + }; 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; + stdenv = stdenv.override (drv: { + allowedRequisites = null; + cc = self.clang; + # Don't include the libc++ and libc++abi from the original stdenv. + extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF; + }); - libcxxStdenv = overrideCC stdenv self.libcxxClang; + libcxxStdenv = stdenv.override (drv: { + allowedRequisites = null; + cc = self.libcxxClang; + # Don't include the libc++ and libc++abi from the original stdenv. + extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF; + }); lldb = callPackage ./lldb.nix {}; diff --git a/pkgs/development/compilers/llvm/3.8/default.nix b/pkgs/development/compilers/llvm/3.8/default.nix index 04cd9f791e62..453d2c1f04b4 100644 --- a/pkgs/development/compilers/llvm/3.8/default.nix +++ b/pkgs/development/compilers/llvm/3.8/default.nix @@ -1,4 +1,4 @@ -{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }: +{ newScope, stdenv, libstdcxxHook, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun, darwin }: let callPackage = newScope (self // { inherit stdenv isl version fetch; }); @@ -22,20 +22,35 @@ let inherit clang-tools-extra_src stdenv; }; - clang = wrapCC self.clang-unwrapped; + clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang; + + libstdcxxClang = ccWrapperFun { + cc = self.clang-unwrapped; + /* FIXME is this right? */ + inherit (stdenv.cc) libc nativeTools nativeLibc; + extraPackages = [ libstdcxxHook ]; + }; 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; + stdenv = stdenv.override (drv: { + allowedRequisites = null; + cc = self.clang; + # Don't include the libc++ and libc++abi from the original stdenv. + extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF; + }); + + libcxxStdenv = stdenv.override (drv: { + allowedRequisites = null; + cc = self.libcxxClang; + # Don't include the libc++ and libc++abi from the original stdenv. + extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF; + }); lldb = callPackage ./lldb.nix {}; diff --git a/pkgs/development/compilers/llvm/3.9/default.nix b/pkgs/development/compilers/llvm/3.9/default.nix index a01e47efb753..755b417c78d4 100644 --- a/pkgs/development/compilers/llvm/3.9/default.nix +++ b/pkgs/development/compilers/llvm/3.9/default.nix @@ -1,4 +1,4 @@ -{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }: +{ newScope, stdenv, libstdcxxHook, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun, darwin }: let callPackage = newScope (self // { inherit stdenv isl version fetch; }); @@ -22,20 +22,35 @@ let inherit clang-tools-extra_src stdenv; }; - clang = wrapCC self.clang-unwrapped; + clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang; + + libstdcxxClang = ccWrapperFun { + cc = self.clang-unwrapped; + /* FIXME is this right? */ + inherit (stdenv.cc) libc nativeTools nativeLibc; + extraPackages = [ libstdcxxHook ]; + }; 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; + stdenv = stdenv.override (drv: { + allowedRequisites = null; + cc = self.clang; + # Don't include the libc++ and libc++abi from the original stdenv. + extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF; + }); + + libcxxStdenv = stdenv.override (drv: { + allowedRequisites = null; + cc = self.libcxxClang; + # Don't include the libc++ and libc++abi from the original stdenv. + extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF; + }); lldb = callPackage ./lldb.nix {}; diff --git a/pkgs/development/compilers/llvm/4/default.nix b/pkgs/development/compilers/llvm/4/default.nix index 11a9a46c15e5..c1d1ce055d76 100644 --- a/pkgs/development/compilers/llvm/4/default.nix +++ b/pkgs/development/compilers/llvm/4/default.nix @@ -37,14 +37,17 @@ let llvm-manpages = lowPrio self.llvm.man; clang-manpages = lowPrio self.clang-unwrapped.man; - clang = wrapCC self.clang-unwrapped; + clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang; - openmp = callPackage ./openmp.nix {}; + libstdcxxClang = ccWrapperFun { + cc = self.clang-unwrapped; + /* FIXME is this right? */ + inherit (stdenv.cc) libc nativeTools nativeLibc; + extraPackages = [ libstdcxxHook ]; + }; 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 ]; @@ -53,11 +56,16 @@ let stdenv = stdenv.override (drv: { allowedRequisites = null; cc = self.clang; - # Use the gcc libstdc++ when targeting linux. - extraBuildInputs = if stdenv.cc.isGNU then [ libstdcxxHook ] else drv.extraBuildInputs; + # Don't include the libc++ and libc++abi from the original stdenv. + extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF; }); - libcxxStdenv = overrideCC stdenv self.libcxxClang; + libcxxStdenv = stdenv.override (drv: { + allowedRequisites = null; + cc = self.libcxxClang; + # Don't include the libc++ and libc++abi from the original stdenv. + extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF; + }); lld = callPackage ./lld.nix {}; @@ -66,6 +74,8 @@ let libcxx = callPackage ./libc++ {}; libcxxabi = callPackage ./libc++abi.nix {}; + + openmp = callPackage ./openmp.nix {}; }; in self |