{clang,gcc}_multi: remove manual throws
This avoids hacky workarounds in CI when generating attrpaths for non-x86_64-linux platforms. Evaluation for these two attributes will not succeed on platforms other than Linux anyway, because: - The unsupported system error from `glibc-nolibgcc` is propagated. - `pkgsi686Linux.gcc` triggers an assert anyway.
This commit is contained in:
@@ -5041,42 +5041,36 @@ with pkgs;
|
||||
|
||||
wrapCCMulti =
|
||||
cc:
|
||||
if stdenv.targetPlatform.system == "x86_64-linux" then
|
||||
let
|
||||
# Binutils with glibc multi
|
||||
bintools = cc.bintools.override {
|
||||
libc = glibc_multi;
|
||||
};
|
||||
in
|
||||
lowPrio (wrapCCWith {
|
||||
cc = cc.cc.override {
|
||||
stdenv = overrideCC stdenv (wrapCCWith {
|
||||
cc = cc.cc;
|
||||
inherit bintools;
|
||||
libc = glibc_multi;
|
||||
});
|
||||
profiledCompiler = false;
|
||||
enableMultilib = true;
|
||||
};
|
||||
let
|
||||
# Binutils with glibc multi
|
||||
bintools = cc.bintools.override {
|
||||
libc = glibc_multi;
|
||||
inherit bintools;
|
||||
extraBuildCommands = ''
|
||||
echo "dontMoveLib64=1" >> $out/nix-support/setup-hook
|
||||
'';
|
||||
})
|
||||
else
|
||||
throw "Multilib ${cc.name} not supported for ‘${stdenv.targetPlatform.system}’";
|
||||
};
|
||||
in
|
||||
lowPrio (wrapCCWith {
|
||||
cc = cc.cc.override {
|
||||
stdenv = overrideCC stdenv (wrapCCWith {
|
||||
cc = cc.cc;
|
||||
inherit bintools;
|
||||
libc = glibc_multi;
|
||||
});
|
||||
profiledCompiler = false;
|
||||
enableMultilib = true;
|
||||
};
|
||||
libc = glibc_multi;
|
||||
inherit bintools;
|
||||
extraBuildCommands = ''
|
||||
echo "dontMoveLib64=1" >> $out/nix-support/setup-hook
|
||||
'';
|
||||
});
|
||||
|
||||
wrapClangMulti =
|
||||
clang:
|
||||
if stdenv.targetPlatform.system == "x86_64-linux" then
|
||||
callPackage ../development/compilers/llvm/multi.nix {
|
||||
inherit clang;
|
||||
gcc32 = pkgsi686Linux.gcc;
|
||||
gcc64 = pkgs.gcc;
|
||||
}
|
||||
else
|
||||
throw "Multilib ${clang.cc.name} not supported for '${stdenv.targetPlatform.system}'";
|
||||
callPackage ../development/compilers/llvm/multi.nix {
|
||||
inherit clang;
|
||||
gcc32 = pkgsi686Linux.gcc;
|
||||
gcc64 = pkgs.gcc;
|
||||
};
|
||||
|
||||
gcc_multi = wrapCCMulti gcc;
|
||||
clang_multi = wrapClangMulti clang;
|
||||
|
||||
Reference in New Issue
Block a user