rocmPackages_5.llvm: use gcc12Stdenv if stdenv.cc.cc.isGNU>=13

This commit is contained in:
Adam Joseph
2023-12-07 09:11:37 +00:00
committed by Adam Joseph
parent c984d48816
commit b334ff1e61
2 changed files with 9 additions and 0 deletions
@@ -1,5 +1,6 @@
{ lib
, stdenv
, gcc12Stdenv
, fetchFromGitHub
, rocmUpdateScript
, pkg-config
@@ -44,6 +45,13 @@
, isBroken ? false
}:
let stdenv' = stdenv; in
let stdenv =
if stdenv'.cc.cc.isGNU or false && lib.versionAtLeast stdenv'.cc.cc.version "13.0"
then gcc12Stdenv
else stdenv';
in
let
llvmNativeTarget =
if stdenv.isx86_64 then "X86"
@@ -12,6 +12,7 @@ overrideCC stdenv (wrapCCWith rec {
inherit bintools;
libcxx = runtimes;
cc = clang-unwrapped;
gccForLibs = stdenv.cc.cc;
extraPackages = [
llvm