dotnet: fix linux build of dotnetCorePackages.dotnet_8 (#370333)

This commit is contained in:
Emily
2025-01-02 21:07:12 +00:00
committed by GitHub
2 changed files with 49 additions and 0 deletions
@@ -0,0 +1,48 @@
From 36354a7aca58753893148d62a889ca9e27381ac0 Mon Sep 17 00:00:00 2001
From: David McFarland <corngood@gmail.com>
Date: Thu, 2 Jan 2025 15:30:16 -0400
Subject: [PATCH] fix clang19 build
---
src/runtime/src/coreclr/vm/comreflectioncache.hpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/runtime/src/coreclr/vm/comreflectioncache.hpp b/src/runtime/src/coreclr/vm/comreflectioncache.hpp
index 08d173e616..12db55251d 100644
--- a/src/runtime/src/coreclr/vm/comreflectioncache.hpp
+++ b/src/runtime/src/coreclr/vm/comreflectioncache.hpp
@@ -26,6 +26,7 @@ public:
void Init();
+#ifndef DACCESS_COMPILE
BOOL GetFromCache(Element *pElement, CacheType& rv)
{
CONTRACTL
@@ -102,6 +103,7 @@ public:
AdjustStamp(TRUE);
this->LeaveWrite();
}
+#endif // !DACCESS_COMPILE
private:
// Lock must have been taken before calling this.
@@ -141,6 +143,7 @@ private:
return CacheSize;
}
+#ifndef DACCESS_COMPILE
void AdjustStamp(BOOL hasWriterLock)
{
CONTRACTL
@@ -170,6 +173,7 @@ private:
if (!hasWriterLock)
this->LeaveWrite();
}
+#endif // !DACCESS_COMPILE
void UpdateHashTable(SIZE_T hash, int slot)
{
--
2.47.0
@@ -148,6 +148,7 @@ stdenv.mkDerivation rec {
]
++ lib.optionals (lib.versionOlder version "9") [
./fix-aspnetcore-portable-build.patch
./fix-clang19-build.patch
];
postPatch =