about summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/6
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-23 09:42:34 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-23 09:45:25 -0400
commitc641a74bd6aa88a0906f036fddb37eddd432a525 (patch)
tree051a9634e0ed7485c44a126eb2c8edf0cb8d3eec /pkgs/development/compilers/llvm/6
parent7ee4dc3b1348ff81852c1ac2f410c48e4df271d2 (diff)
parentbbcaf78350d87c4657b1a2451132535467a454eb (diff)
Merge remote-tracking branch 'upstream/master' into ios-mini-staging
Diffstat (limited to 'pkgs/development/compilers/llvm/6')
-rw-r--r--pkgs/development/compilers/llvm/6/default.nix16
1 files changed, 7 insertions, 9 deletions
diff --git a/pkgs/development/compilers/llvm/6/default.nix b/pkgs/development/compilers/llvm/6/default.nix
index cfa9e9e15fcf1..be26a38e32ecd 100644
--- a/pkgs/development/compilers/llvm/6/default.nix
+++ b/pkgs/development/compilers/llvm/6/default.nix
@@ -1,6 +1,8 @@
 { lowPrio, newScope, stdenv, targetPlatform, cmake, libstdcxxHook
-, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun
+, libxml2, python2, isl, fetchurl, overrideCC, wrapCCWith
 , darwin
+, buildLlvmPackages # ourself, but from the previous stage, for cross
+, targetLlvmPackages # ourself, but from the next stage, for cross
 }:
 
 let
@@ -40,18 +42,14 @@ let
 
     clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang;
 
-    libstdcxxClang = ccWrapperFun {
+    libstdcxxClang = wrapCCWith {
       cc = self.clang-unwrapped;
-      /* FIXME is this right? */
-      inherit (stdenv.cc) bintools libc nativeTools nativeLibc;
       extraPackages = [ libstdcxxHook ];
     };
 
-    libcxxClang = ccWrapperFun {
+    libcxxClang = wrapCCWith {
       cc = self.clang-unwrapped;
-      /* FIXME is this right? */
-      inherit (stdenv.cc) bintools libc nativeTools nativeLibc;
-      extraPackages = [ self.libcxx self.libcxxabi ];
+      extraPackages = [ targetLlvmPackages.libcxx targetLlvmPackages.libcxxabi ];
     };
 
     stdenv = stdenv.override (drv: {
@@ -61,7 +59,7 @@ let
 
     libcxxStdenv = stdenv.override (drv: {
       allowedRequisites = null;
-      cc = self.libcxxClang;
+      cc = buildLlvmPackages.libcxxClang;
     });
 
     lld = callPackage ./lld.nix {};