diff --git a/src/coreclr/vm/comreflectioncache.hpp b/src/coreclr/vm/comreflectioncache.hpp index 08d173e61648c..12db55251d80d 100644 --- a/src/coreclr/vm/comreflectioncache.hpp +++ b/src/coreclr/vm/comreflectioncache.hpp @@ -26,6 +26,7 @@ template class ReflectionCache void Init(); +#ifndef DACCESS_COMPILE BOOL GetFromCache(Element *pElement, CacheType& rv) { CONTRACTL @@ -102,6 +103,7 @@ template class ReflectionCache AdjustStamp(TRUE); this->LeaveWrite(); } +#endif // !DACCESS_COMPILE private: // Lock must have been taken before calling this. @@ -141,6 +143,7 @@ template class ReflectionCache return CacheSize; } +#ifndef DACCESS_COMPILE void AdjustStamp(BOOL hasWriterLock) { CONTRACTL @@ -170,6 +173,7 @@ template class ReflectionCache if (!hasWriterLock) this->LeaveWrite(); } +#endif // !DACCESS_COMPILE void UpdateHashTable(SIZE_T hash, int slot) { diff --git a/src/native/libs/CMakeLists.txt b/src/native/libs/CMakeLists.txt index b8ec2cf654cf1..67f2858647e0f 100644 --- a/src/native/libs/CMakeLists.txt +++ b/src/native/libs/CMakeLists.txt @@ -128,6 +128,12 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI) add_compile_options(-Wno-cast-align) add_compile_options(-Wno-typedef-redefinition) add_compile_options(-Wno-c11-extensions) + + check_c_compiler_flag(-Wpre-c11-compat COMPILER_SUPPORTS_W_PRE_C11_COMPAT) + if (COMPILER_SUPPORTS_W_PRE_C11_COMPAT) + add_compile_options(-Wno-pre-c11-compat) + endif() + add_compile_options(-Wno-thread-safety-analysis) if (CLR_CMAKE_TARGET_BROWSER) add_compile_options(-Wno-unsafe-buffer-usage)