libcCross: set to null rather than using assert in nonsense scenarios (#340331)

This commit is contained in:
Philip Taron 2024-09-07 16:59:31 -07:00 committed by GitHub
commit 80bf97b8c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20300,7 +20300,10 @@ with pkgs;
else if name == "relibc" then targetPackages.relibc or relibc
else throw "Unknown libc ${name}";
libcCross = assert stdenv.targetPlatform != stdenv.buildPlatform; libcCrossChooser stdenv.targetPlatform.libc;
libcCross =
if stdenv.targetPlatform == stdenv.buildPlatform
then null
else libcCrossChooser stdenv.targetPlatform.libc;
threadsCross =
lib.optionalAttrs (stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false)) {