From 5fb54bf81d318c51eaf62bfe65661deec37538c8 Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Fri, 16 Jun 2023 09:13:39 -0400
Subject: [PATCH] rts: Disable `#pragma GCC`s on clang compilers

Otherwise the build fails due to warnings. See #23530.
---
 rts/Hash.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rts/Hash.c b/rts/Hash.c
index cf5bc8fc1255..35ee26ce0b8f 100644
--- a/rts/Hash.c
+++ b/rts/Hash.c
@@ -18,11 +18,13 @@
    since we compile these things these days with cabal we can no longer
    specify optimization per file.  So we have to resort to pragmas.  */
 #if defined(__GNUC__) || defined(__GNUG__)
+#if !defined(__clang__)
 #if !defined(DEBUG)
 #pragma GCC push_options
 #pragma GCC optimize ("O3")
 #endif
 #endif
+#endif
 
 #define XXH_NAMESPACE __rts_
 #define XXH_STATIC_LINKING_ONLY   /* access advanced declarations */
@@ -565,7 +567,9 @@ int keyCountHashTable (HashTable *table)
 
 
 #if defined(__GNUC__) || defined(__GNUG__)
+#if !defined(__clang__)
 #if !defined(DEBUG)
 #pragma GCC pop_options
 #endif
 #endif
+#endif
-- 
GitLab