Unverified Commit 4c78e34c authored by Fabián Heredia Montiel's avatar Fabián Heredia Montiel Committed by GitHub
Browse files

rocmPackages.llvm.rocmcxx: rm bootstrap compiler references (#418461)

parents 47b08577 f5177f3d
Loading
Loading
Loading
Loading
+32 −20
Original line number Diff line number Diff line
@@ -54,6 +54,8 @@ let
    stdenv.cc.bintools
    gcc-unwrapped
    stdenvToBuildRocmLlvm
    stdenvToBuildRocmLlvm.cc
    stdenvToBuildRocmLlvm.cc.cc
  ];
  gcc-prefix =
    let
@@ -126,7 +128,14 @@ let
    let
      linked = symlinkJoin { inherit name paths; };
    in
    runCommand name { } ''
    runCommand name
      {
        # If this is erroring, try why-depends --precise on the symlinkJoin of inputs to look for the problem
        # nix why-depends --precise .#rocmPackages.llvm.rocmcxx.linked /store/path/its/not/allowed
        disallowedRequisites = disallowedRefsForToolchain;
        passthru.linked = linked;
      }
      ''
        set -x
        mkdir -p $out/
        cp --reflink=auto -rL ${linked}/* $out/
@@ -134,7 +143,8 @@ let
        mkdir -p $out/usr
        ln -s $out/ $out/usr/local
        mkdir -p $out/nix-support/
      rm -rf $out/lib64 # we don't need mixed 32 bit
        # we don't need mixed 32 bit, the presence of lib64 is used by LLVM to decide it's a multilib sysroot
        rm -rf $out/lib64
        echo 'export CC=clang' >> $out/nix-support/setup-hook
        echo 'export CXX=clang++' >> $out/nix-support/setup-hook
        mkdir -p $out/lib/clang/${llvmMajorVersion}/lib/linux/
@@ -371,6 +381,8 @@ rec {
          postFixup =
            (old.postFixup or "")
            + ''
              find $lib -type f -exec remove-references-to -t ${stdenvToBuildRocmLlvm.cc} {} +
              find $lib -type f -exec remove-references-to -t ${stdenv.cc} {} +
              find $lib -type f -exec remove-references-to -t ${stdenv.cc.cc} {} +
              find $lib -type f -exec remove-references-to -t ${stdenv.cc.bintools} {} +
            '';