diff options
author | Keith Short <keithshort@chromium.org> | 2021-03-19 16:14:22 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-24 20:19:49 +0000 |
commit | dc76e389faf2442399c1d5bc3c69800767091fa1 (patch) | |
tree | ed2f8e5435cc9b79c01ad3413ff8828682edbceb /zephyr/projects/trogdor/lazor/CMakeLists.txt | |
parent | d3468b111247e43ffdc1855f1c07ad802f1c3cc2 (diff) | |
download | chrome-ec-dc76e389faf2442399c1d5bc3c69800767091fa1.tar.gz |
zephyr: Enable link time optimization for board files
Move the baseboard and board files into the zephyr_ec library to take
advantage of the LTO compiler option enabled for the zephyr_ec library.
On Volteer, this reduces the image size by 832 bytes. Total LTO saving
is just over 10,000 bytes.
BUG=none
BRANCH=none
TEST=zmake testall
TEST=boot zephry-ec on Volteer, verify AP boots
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I2f3aa7f6c400a5b5cd1b346fcf52160b834e66a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776218
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/projects/trogdor/lazor/CMakeLists.txt')
-rw-r--r-- | zephyr/projects/trogdor/lazor/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zephyr/projects/trogdor/lazor/CMakeLists.txt b/zephyr/projects/trogdor/lazor/CMakeLists.txt index 37d42dab52..030e92ed58 100644 --- a/zephyr/projects/trogdor/lazor/CMakeLists.txt +++ b/zephyr/projects/trogdor/lazor/CMakeLists.txt @@ -9,18 +9,18 @@ set(BOARD_ROOT "${CMAKE_CURRENT_LIST_DIR}/..") find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(lazor) -zephyr_include_directories(include) +zephyr_library_include_directories(include) set(PLATFORM_EC_BASEBOARD "${PLATFORM_EC}/baseboard/trogdor" CACHE PATH "Path to the platform/ec baseboard directory") set(PLATFORM_EC_BOARD "${PLATFORM_EC}/board/lazor" CACHE PATH "Path to the platform/ec board directory") -zephyr_sources_ifdef(CONFIG_PLATFORM_EC_USBC +zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USBC "${PLATFORM_EC_BASEBOARD}/usbc_config.c" "${PLATFORM_EC_BASEBOARD}/usb_pd_policy.c") -zephyr_sources( +zephyr_library_sources( "${PLATFORM_EC_BOARD}/battery.c" "${PLATFORM_EC_BOARD}/sku.c" "${PLATFORM_EC_BOARD}/switchcap.c" |