clang-stdenv: move libstdcxxHook to cc-wrapper
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user