3
0
Fork 0
forked from mirrors/nixpkgs

llvm-packages: apply cc-wrapper/stdenv changes to older versions

This commit is contained in:
Daiderd Jordan 2017-09-11 20:44:32 +02:00
parent ac88515052
commit ad486c48a6
No known key found for this signature in database
GPG key ID: D02435D05B810C96
3 changed files with 66 additions and 18 deletions

View file

@ -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 {};

View file

@ -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;
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 {};

View file

@ -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;
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 {};