push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
From f259eca77c592813e11752a46c4e1f9a74c64091 Mon Sep 17 00:00:00 2001
From: Luna Nova <git@lunnova.dev>
Date: Fri, 11 Oct 2024 02:56:22 -0700
Subject: [PATCH] [hipcc] Remove extra definition of hipBinUtilPtr_ in derived
platforms
Fixes UB when hipBinUtilPtr_ is used.
---
amd/hipcc/src/hipBin_amd.h | 1 -
amd/hipcc/src/hipBin_nvidia.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/amd/hipcc/src/hipBin_amd.h b/amd/hipcc/src/hipBin_amd.h
index 0a782d1beab9..36cd625ae8bc 100644
--- a/src/hipBin_amd.h
+++ b/src/hipBin_amd.h
@@ -42,7 +42,6 @@ THE SOFTWARE.
class HipBinAmd : public HipBinBase {
private:
- HipBinUtil* hipBinUtilPtr_;
string hipClangPath_ = "";
string roccmPathEnv_, hipRocclrPathEnv_, hsaPathEnv_;
PlatformInfo platformInfoAMD_;
diff --git a/amd/hipcc/src/hipBin_nvidia.h b/amd/hipcc/src/hipBin_nvidia.h
index ff142cc1cea2..09b7b80979c7 100644
--- a/src/hipBin_nvidia.h
+++ b/src/hipBin_nvidia.h
@@ -31,7 +31,6 @@ THE SOFTWARE.
class HipBinNvidia : public HipBinBase {
private:
- HipBinUtil* hipBinUtilPtr_;
string cudaPath_ = "";
PlatformInfo platformInfoNV_;
string hipCFlags_, hipCXXFlags_, hipLdFlags_;
--
2.46.0

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
rocm-merged-llvm,
cmake,
lsb-release,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hipcc";
# In-tree with ROCm LLVM
inherit (rocm-merged-llvm) version;
src = rocm-merged-llvm.llvm-src;
sourceRoot = "${finalAttrs.src.name}/amd/hipcc";
nativeBuildInputs = [ cmake ];
buildInputs = [ rocm-merged-llvm ];
patches = [
# https://github.com/ROCm/llvm-project/pull/183
# Fixes always-invoked UB in hipcc
./0001-hipcc-Remove-extra-definition-of-hipBinUtilPtr_-in-d.patch
];
postPatch = ''
substituteInPlace src/hipBin_amd.h \
--replace-fail "/usr/bin/lsb_release" "${lsb-release}/bin/lsb_release"
'';
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
];
postInstall = ''
rm -r $out/hip/bin
ln -s $out/bin $out/hip/bin
'';
meta = with lib; {
description = "Compiler driver utility that calls clang or nvcc";
homepage = "https://github.com/ROCm/HIPCC";
license = with licenses; [ mit ];
maintainers = with maintainers; [ lovesegfault ];
teams = [ teams.rocm ];
platforms = platforms.linux;
};
})