aports/testing/dotnet6-build/runtime_clang-19.patch
2024-10-19 23:27:29 +00:00

56 lines
1.9 KiB
Diff

commit e356f564bf74909e77d000e3ad1b8b43c30d070c (HEAD -> release/8.0)
Author: Omair Majid <omajid@redhat.com>
Date: Tue Oct 15 14:53:33 2024 -0400
Fix clang19 build (#105141)
diff --git a/src/runtime/src/coreclr/vm/comreflectioncache.hpp b/src/runtime/src/coreclr/vm/comreflectioncache.hpp
index 08d173e6164..12db55251d8 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)
{
diff --git a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt.orig b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
index e9ebefcf824..7f27c0bc105 100644
--- a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt.orig
+++ b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
@@ -35,6 +35,9 @@ add_compile_options(-Wno-empty-translation-unit)
add_compile_options(-Wno-cast-align)
add_compile_options(-Wno-typedef-redefinition)
add_compile_options(-Wno-c11-extensions)
+add_compile_options(-Wno-pre-c11-compat) # fixes build on Debian
+add_compile_options(-Wno-unknown-warning-option) # unknown warning option '-Wno-pre-c11-compat'
+add_compile_options(-Wno-switch-default)
add_compile_options(-Wno-unknown-pragmas)
add_compile_options(-Wno-unknown-warning-option)
add_compile_options(-Wno-unused-but-set-variable)