stdenvNoCC: Fix hasCC attr during cross, remove noCC

`hasCC` was getting overridden in the cross bootstrapping (for GHCJS),
which preventing the default logic from re-triggering for `stdenvNoCC`.

Also remove `stdenv.noCC` which is obseleted by `stdenv.hasCC`.
This commit is contained in:
John Ericson 2021-04-23 21:47:28 +00:00
parent 068a59a394
commit f684c917a6
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ in rec {
++ depsHostHost ++ depsHostHostPropagated
++ buildInputs ++ propagatedBuildInputs
++ depsTargetTarget ++ depsTargetTargetPropagated) == 0;
dontAddHostSuffix = attrs ? outputHash && !noNonNativeDeps || (stdenv.noCC or false);
dontAddHostSuffix = attrs ? outputHash && !noNonNativeDeps || !stdenv.hasCC;
supportedHardeningFlags = [ "fortify" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ];
# Musl-based platforms will keep "pie", other platforms will not.
defaultHardeningFlags = if stdenv.hostPlatform.isMusl &&

View File

@ -30,7 +30,7 @@ in
# just the plain stdenv.
stdenv_32bit = lowPrio (if stdenv.hostPlatform.is32bit then stdenv else multiStdenv);
stdenvNoCC = stdenv.override { cc = null; extraAttrs.noCC = true; };
stdenvNoCC = stdenv.override { cc = null; hasCC = false; };
mkStdenvNoLibs = stdenv: let
bintools = stdenv.cc.bintools.override {