gccWithoutTargetLibc: move assert to meta.badPlatforms
An assert can't be caught by CI for generation of attrpaths during Eval. An error reported via meta.badPlatforms can be. The alternative of returning null in the CI case, similar to the commits before, is not helpful, because it only causes failed builds or eval downstream - when this dependency is passed on and used as `null`.
This commit is contained in:
@@ -5108,11 +5108,10 @@ with pkgs;
|
||||
# The GCC used to build libc for the target platform. Normal gccs will be
|
||||
# built with, and use, that cross-compiled libc.
|
||||
gccWithoutTargetLibc =
|
||||
assert stdenv.targetPlatform != stdenv.hostPlatform;
|
||||
let
|
||||
libc1 = binutilsNoLibc.libc;
|
||||
in
|
||||
wrapCCWith {
|
||||
(wrapCCWith {
|
||||
cc = gccFun {
|
||||
# copy-pasted
|
||||
inherit noSysDirs;
|
||||
@@ -5138,7 +5137,14 @@ with pkgs;
|
||||
bintools = binutilsNoLibc;
|
||||
libc = libc1;
|
||||
extraPackages = [ ];
|
||||
};
|
||||
}).overrideAttrs
|
||||
(prevAttrs: {
|
||||
meta = prevAttrs.meta // {
|
||||
badPlatforms =
|
||||
(prevAttrs.meta.badPlatforms or [ ])
|
||||
++ lib.optionals (stdenv.targetPlatform == stdenv.hostPlatform) [ stdenv.hostPlatform.system ];
|
||||
};
|
||||
});
|
||||
|
||||
inherit (callPackage ../development/compilers/gcc/all.nix { inherit noSysDirs; })
|
||||
gcc9
|
||||
|
||||
Reference in New Issue
Block a user