summaryrefslogtreecommitdiff
path: root/zephyr/shim/chip/npcx
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-03-19 10:20:27 -0600
committerCommit Bot <commit-bot@chromium.org>2021-03-24 20:19:48 +0000
commitd3468b111247e43ffdc1855f1c07ad802f1c3cc2 (patch)
treed781083a272121adeadd3b5f3f821f92e2a52dc0 /zephyr/shim/chip/npcx
parent5eb23205dd023a738a9cbc0ae90661a898274180 (diff)
downloadchrome-ec-d3468b111247e43ffdc1855f1c07ad802f1c3cc2.tar.gz
zephyr: Enable link time optimization (LTO)
The upstream Zephyr repo does not support LTO. Reconfigure the platform/ec source files into a cmake library so the LTO option can be enabled for all the platorm/ec sources. This reduces the Volteer flash image size by 9176 bytes. BUG=none BRANCH=none TEST=zmake testall TEST=boot zephyr-ec on Volteer, verfiy AP boots Cq-Depend: chromium:2776218 Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I8312773c8b21c498ec8116a8558b7571831159ff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776217 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/shim/chip/npcx')
-rw-r--r--zephyr/shim/chip/npcx/CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/zephyr/shim/chip/npcx/CMakeLists.txt b/zephyr/shim/chip/npcx/CMakeLists.txt
index 3c841da1fe..93732b9154 100644
--- a/zephyr/shim/chip/npcx/CMakeLists.txt
+++ b/zephyr/shim/chip/npcx/CMakeLists.txt
@@ -2,11 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-zephyr_include_directories(include)
+zephyr_library_include_directories(include)
-zephyr_sources(clock.c)
-zephyr_sources_ifdef(CONFIG_CROS_KB_RAW_NPCX keyboard_raw.c)
-zephyr_sources_ifdef(CONFIG_CROS_EC system.c)
+zephyr_library_sources(clock.c)
+zephyr_library_sources_ifdef(CONFIG_CROS_KB_RAW_NPCX keyboard_raw.c)
+zephyr_library_sources_ifdef(CONFIG_CROS_EC system.c)
-zephyr_sources_ifdef(CONFIG_PLATFORM_EC_EXTERNAL_STORAGE
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_EXTERNAL_STORAGE
system_external_storage.c)