From: Simon Glass <sjg@chromium.org>
Date: Fri, 28 Apr 2023 19:50:48 +0000 (-0600)
Subject: buildman: Pass -Werror to the host compiler too
X-Git-Tag: v2025.01-rc5-pxa1908~1013^2~1
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B?a=commitdiff_plain;h=43bdb3b39a0984c8c6ffcbb847bf648e941c0d26;p=u-boot.git

buildman: Pass -Werror to the host compiler too

The host compiler is not failing on warnings at present, when the
-E flag is used in buildman. Add the required flag to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com>
---

diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 879ff138ad..635865c21c 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -253,6 +253,7 @@ class BuilderThread(threading.Thread):
                     args.extend(['-j', str(self.builder.num_jobs)])
                 if self.builder.warnings_as_errors:
                     args.append('KCFLAGS=-Werror')
+                    args.append('HOSTCFLAGS=-Werror')
                 if self.builder.allow_missing:
                     args.append('BINMAN_ALLOW_MISSING=1')
                 if self.builder.no_lto: