summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-08-17 16:00:14 -0600
committerCommit Bot <commit-bot@chromium.org>2021-08-17 23:25:17 +0000
commitef6a4403f00aec332e0d53c5ff913261c347532b (patch)
tree9266127c8501d84043a96f69b4ddca93d8439828
parentcd73e503e98aac047a319aab95710d3dd8422eb0 (diff)
downloadchrome-ec-ef6a4403f00aec332e0d53c5ff913261c347532b.tar.gz
zephyr: Enable -Werror
Enable -Werror compile options so that code warnings cause build failures. BUG=b:174871569 BRANCH=none TEST=zmake testall TEST=Introduce unused variable warning, verify build fails Change-Id: Ifecfc391dc936a56ba9c02d70f089e058f0453d2 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3101832 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
-rw-r--r--zephyr/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index c736fb6a18..af577cdc34 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -61,6 +61,9 @@ if(DEFINED CONFIG_PLATFORM_EC)
# with Zephyr builds only.
zephyr_compile_definitions("CONFIG_ZEPHYR")
+ # Force compiler warnings to generate errors
+ zephyr_compile_options(-Werror)
+
# When LTO is enabled, enable only for the "app" library, which compiles
# and links all Chromium OS sources.
# TODO: Enable LTO for all sources when Zephyr supports it.