gccStdenvNoLibs, clangStdenvNoLibs: Init

libgcc can only be built with gcc evidentally, so we need a way for
Darwin to force gcc without bringing in the other default library
dependencies libgcc doesn't---and shouldn't---need.
This commit is contained in:
John Ericson 2019-02-22 14:44:18 -05:00
parent bd2b0d0886
commit 16cc323d7c

View File

@ -35,7 +35,7 @@ in
stdenvNoCC = stdenv.override { cc = null; extraAttrs.noCC = true; };
stdenvNoLibs = let
mkStdenvNoLibs = stdenv: let
bintools = stdenv.cc.bintools.override {
libc = null;
noLibc = true;
@ -51,6 +51,11 @@ in
lib.mapNullable (rs: rs ++ [ bintools ]) (stdenv.allowedRequisites or null);
};
stdenvNoLibs = mkStdenvNoLibs stdenv;
gccStdenvNoLibs = mkStdenvNoLibs gccStdenv;
clangStdenvNoLibs = mkStdenvNoLibs clangStdenv;
# For convenience, allow callers to get the path to Nixpkgs.
path = ../..;