From 8a6eb56a5ad9b17f1f939a6983b04847c96bf9e2 Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Thu, 29 Jun 2023 10:37:01 -0400
Subject: [PATCH] hadrian: Don't treat -Winline warnings as fatal

Such warnings are highly dependent upon the toolchain, platform, and
build configuration. It's simply too fragile to rely on these.

(cherry picked from commit ec55035f8fe901b5d369221975fb1a741c677acb)
---
 hadrian/src/Flavour.hs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs
index 5dd70580ce2..b11c37e763b 100644
--- a/hadrian/src/Flavour.hs
+++ b/hadrian/src/Flavour.hs
@@ -138,6 +138,8 @@ werror =
           [ arg "-optc-Werror"
             -- clang complains about #pragma GCC pragmas
           , arg "-optc-Wno-error=unknown-pragmas"
+            -- rejected inlinings are highly dependent upon toolchain and way
+          , arg "-optc-Wno-error=inline"
           ]
       -- N.B. We currently don't build the boot libraries' C sources with -Werror
       -- as this tends to be a portability nightmare.
-- 
GitLab