kernel: move xip code to dedicated file

No functional changes, just moving the XIP code out and build it only
when XIP is enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2020-08-27 08:37:10 -04:00
commit de69edbf42
3 changed files with 80 additions and 59 deletions

View file

@ -2,7 +2,8 @@
# kernel is a normal CMake library and not a zephyr_library because it
# should not be --whole-archive'd
add_library(kernel
list(APPEND kernel_files
device.c
errno.c
fatal.c
@ -26,6 +27,13 @@ add_library(kernel
smp.c
)
if(CONFIG_XIP)
list(APPEND kernel_files
xip.c)
endif()
add_library(kernel ${kernel_files})
# Kernel files has the macro __ZEPHYR_SUPERVISOR__ set so that it
# optimizes the code when userspace is enabled.
set_target_properties(