Add libcxxStdenv attribute to recent llvm package sets

This commit is contained in:
Shea Levy 2016-10-25 10:29:40 -04:00
parent 76b696d7db
commit be02229f06
4 changed files with 40 additions and 5 deletions

View file

@ -1,4 +1,4 @@
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC }:
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }:
let
callPackage = newScope (self // { inherit stdenv isl version fetch; });
@ -24,8 +24,19 @@ let
clang = wrapCC self.clang-unwrapped;
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;
lldb = callPackage ./lldb.nix {};
libcxx = callPackage ./libc++ {};

View file

@ -1,4 +1,4 @@
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC }:
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }:
let
callPackage = newScope (self // { inherit stdenv isl version fetch; });
@ -24,8 +24,19 @@ let
clang = wrapCC self.clang-unwrapped;
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;
lldb = callPackage ./lldb.nix {};
libcxx = callPackage ./libc++ {};

View file

@ -1,4 +1,4 @@
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, darwin }:
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
let
callPackage = newScope (self // { inherit stdenv isl version fetch; });
@ -24,8 +24,19 @@ let
clang = wrapCC self.clang-unwrapped;
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;
lldb = callPackage ./lldb.nix {};
libcxx = callPackage ./libc++ {};

View file

@ -4520,7 +4520,7 @@ in
#Use this instead of stdenv to build with clang
clangStdenv = if stdenv.isDarwin then stdenv else lowPrio llvmPackages.stdenv;
libcxxStdenv = stdenvAdapters.overrideCC stdenv (clangWrapSelf llvmPackages.clang-unwrapped);
libcxxStdenv = lowPrio llvmPackages.libcxxStdenv;
clean = callPackage ../development/compilers/clean { };
@ -5247,7 +5247,9 @@ in
inherit libc extraBuildCommands;
};
wrapCC = wrapCCWith (callPackage ../build-support/cc-wrapper) stdenv.cc.libc "";
ccWrapperFun = callPackage ../build-support/cc-wrapper;
wrapCC = wrapCCWith ccWrapperFun stdenv.cc.libc "";
# legacy version, used for gnat bootstrapping
wrapGCC-old = baseGCC: callPackage ../build-support/gcc-wrapper-old {
nativeTools = stdenv.cc.nativeTools or false;