Unverified Commit 63e69e43 authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

{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.
parent cc1dd948
Loading
Loading
Loading
Loading
+26 −32
Original line number Diff line number Diff line
@@ -5041,7 +5041,6 @@ with pkgs;

  wrapCCMulti =
    cc:
    if stdenv.targetPlatform.system == "x86_64-linux" then
    let
      # Binutils with glibc multi
      bintools = cc.bintools.override {
@@ -5063,20 +5062,15 @@ with pkgs;
      extraBuildCommands = ''
        echo "dontMoveLib64=1" >> $out/nix-support/setup-hook
      '';
      })
    else
      throw "Multilib ${cc.name} not supported for ‘${stdenv.targetPlatform.system}’";
    });

  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}'";
    };

  gcc_multi = wrapCCMulti gcc;
  clang_multi = wrapClangMulti clang;