diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-09-11 20:44:32 +0200 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2017-09-13 20:51:52 +0200 |
commit | ad486c48a66ee72283e37d6da52a5f74ae56413f (patch) | |
tree | 42de3bc55a08f5ad98e90e4abec63f3f726f7e30 /pkgs/development | |
parent | ac88515052316802b09fd0956aa4ef0b8a63b823 (diff) | |
download | nixpkgs-ad486c48a66ee72283e37d6da52a5f74ae56413f.tar nixpkgs-ad486c48a66ee72283e37d6da52a5f74ae56413f.tar.gz nixpkgs-ad486c48a66ee72283e37d6da52a5f74ae56413f.tar.bz2 nixpkgs-ad486c48a66ee72283e37d6da52a5f74ae56413f.tar.lz nixpkgs-ad486c48a66ee72283e37d6da52a5f74ae56413f.tar.xz nixpkgs-ad486c48a66ee72283e37d6da52a5f74ae56413f.tar.zst nixpkgs-ad486c48a66ee72283e37d6da52a5f74ae56413f.zip |
llvm-packages: apply cc-wrapper/stdenv changes to older versions
Diffstat (limited to 'pkgs/development')
-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 |
3 files changed, 68 insertions, 20 deletions
diff --git a/pkgs/development/compilers/llvm/3.7/default.nix b/pkgs/development/compilers/llvm/3.7/default.nix index b7155defb43..432443e1a89 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 04cd9f791e6..453d2c1f04b 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 a01e47efb75..755b417c78d 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 {}; |