diff --git a/pkgs/development/compilers/dotnet/fix-clang19-build.patch b/pkgs/development/compilers/dotnet/fix-clang19-build.patch new file mode 100644 index 000000000000..40964acb24dd --- /dev/null +++ b/pkgs/development/compilers/dotnet/fix-clang19-build.patch @@ -0,0 +1,48 @@ +From 36354a7aca58753893148d62a889ca9e27381ac0 Mon Sep 17 00:00:00 2001 +From: David McFarland +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 + diff --git a/pkgs/development/compilers/dotnet/vmr.nix b/pkgs/development/compilers/dotnet/vmr.nix index 45c10ebd3b39..1e71d0bd6509 100644 --- a/pkgs/development/compilers/dotnet/vmr.nix +++ b/pkgs/development/compilers/dotnet/vmr.nix @@ -148,6 +148,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (lib.versionOlder version "9") [ ./fix-aspnetcore-portable-build.patch + ./fix-clang19-build.patch ]; postPatch =