top level: Clean up definitions of alternative stdenvs
- Dispatch off more appropriate conditions---`stdenv.cc.is*` and `hostPlatform.is*` directly---rather than the OS as a proxy. - Don't worry about pulling in binutils from normal `stdenv.cc` for `gccMultiStdenv`. - Defining a `multiStdenv` that uses whatever compiler is default. - Define `stdenv_32bit` in terms of `multiStdenv`.
This commit is contained in:
parent
f5fc1ff344
commit
831c71eea3
|
@ -34,11 +34,7 @@ with pkgs;
|
|||
# A stdenv capable of building 32-bit binaries. On x86_64-linux,
|
||||
# it uses GCC compiled with multilib support; on i686-linux, it's
|
||||
# just the plain stdenv.
|
||||
stdenv_32bit = lowPrio (
|
||||
if system == "x86_64-linux" then
|
||||
overrideCC stdenv gcc_multi
|
||||
else
|
||||
stdenv);
|
||||
stdenv_32bit = lowPrio (if hostPlatform.is32bit then stdenv else multiStdenv);
|
||||
|
||||
stdenvNoCC = stdenv.override { cc = null; };
|
||||
|
||||
|
@ -5544,7 +5540,7 @@ with pkgs;
|
|||
};
|
||||
|
||||
#Use this instead of stdenv to build with clang
|
||||
clangStdenv = if stdenv.isDarwin then stdenv else lowPrio llvmPackages.stdenv;
|
||||
clangStdenv = if stdenv.cc.isClang then stdenv else lowPrio llvmPackages.stdenv;
|
||||
clang-sierraHack-stdenv = overrideCC stdenv clang-sierraHack;
|
||||
libcxxStdenv = if stdenv.isDarwin then stdenv else lowPrio llvmPackages.libcxxStdenv;
|
||||
|
||||
|
@ -5601,11 +5597,12 @@ with pkgs;
|
|||
gcc = gcc6;
|
||||
gcc-unwrapped = gcc.cc;
|
||||
|
||||
gccStdenv = if (!stdenv.isDarwin) then stdenv else stdenv.override {
|
||||
gccStdenv = if stdenv.cc.isGNU then stdenv else stdenv.override {
|
||||
allowedRequisites = null;
|
||||
cc = gcc;
|
||||
# Include unwrapped binaries like AS, etc. and remove libcxx/libcxxabi
|
||||
extraBuildInputs = [ stdenv.cc.cc ];
|
||||
# Remove libcxx/libcxxabi, and add clang for AS if on darwin (it uses
|
||||
# clang's internal assembler).
|
||||
extraBuildInputs = lib.optional hostPlatform.isDarwin clang.cc;
|
||||
};
|
||||
|
||||
wrapCCMulti = cc:
|
||||
|
@ -5645,6 +5642,7 @@ with pkgs;
|
|||
|
||||
gccMultiStdenv = overrideCC stdenv gcc_multi;
|
||||
clangMultiStdenv = overrideCC stdenv clang_multi;
|
||||
multiStdenv = if stdenv.cc.isClang then clangMultiStdenv else gccMultiStdenv;
|
||||
|
||||
gcc_debug = lowPrio (wrapCC (gcc.cc.override {
|
||||
stripped = false;
|
||||
|
|
Loading…
Reference in New Issue