summaryrefslogtreecommitdiff
path: root/zephyr/shim/core/cortex-m/CMakeLists.txt
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/core/cortex-m/CMakeLists.txt
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/core/cortex-m/CMakeLists.txt')
-rw-r--r--zephyr/shim/core/cortex-m/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/zephyr/shim/core/cortex-m/CMakeLists.txt b/zephyr/shim/core/cortex-m/CMakeLists.txt
index 9dc2defce4..2481b49efe 100644
--- a/zephyr/shim/core/cortex-m/CMakeLists.txt
+++ b/zephyr/shim/core/cortex-m/CMakeLists.txt
@@ -2,4 +2,4 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-zephyr_sources_ifdef(CONFIG_PLATFORM_EC_SOFTWARE_PANIC software_panic.c)
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_SOFTWARE_PANIC software_panic.c)