-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[automated] Merge branch 'release/8.0.3xx' => 'release/8.0.4xx' (#20263)
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
src/SourceBuild/patches/runtime/0001-Add-support-for-building-with-Clang-19.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Nikola Milosavljevic <[email protected]> | ||
Date: Tue, 3 Dec 2024 19:24:39 +0000 | ||
Subject: [PATCH] Add support for building with Clang 19 | ||
|
||
Backport: https://github.com/dotnet/runtime/pull/109198 | ||
--- | ||
src/coreclr/vm/comreflectioncache.hpp | 4 ++++ | ||
src/native/libs/CMakeLists.txt | 6 ++++++ | ||
2 files changed, 10 insertions(+) | ||
|
||
diff --git a/src/coreclr/vm/comreflectioncache.hpp b/src/coreclr/vm/comreflectioncache.hpp | ||
index 08d173e6164..12db55251d8 100644 | ||
--- a/src/coreclr/vm/comreflectioncache.hpp | ||
+++ b/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/native/libs/CMakeLists.txt b/src/native/libs/CMakeLists.txt | ||
index b8ec2cf654c..67f2858647e 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) |