llext-edk: add Kconfig option to enable EDK generation
Add a new Kconfig option to make the generation of an Extension Development Kit (EDK) for the LLEXT subsystem optional. This allows to cleanly separate EDK-related configuration and build steps from the rest of the Zeprhyr build system. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit is contained in:
parent
6ce55b9a58
commit
d043a21426
2 changed files with 40 additions and 29 deletions
|
@ -2220,6 +2220,7 @@ if((CMAKE_BUILD_TYPE IN_LIST build_types) AND (NOT NO_BUILD_TYPE_WARNING))
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Extension Development Kit (EDK) generation.
|
# Extension Development Kit (EDK) generation.
|
||||||
|
if(CONFIG_LLEXT_EDK)
|
||||||
set(llext_edk_file ${PROJECT_BINARY_DIR}/${CONFIG_LLEXT_EDK_NAME}.tar.xz)
|
set(llext_edk_file ${PROJECT_BINARY_DIR}/${CONFIG_LLEXT_EDK_NAME}.tar.xz)
|
||||||
|
|
||||||
# TODO maybe generate flags for C CXX ASM
|
# TODO maybe generate flags for C CXX ASM
|
||||||
|
@ -2260,6 +2261,7 @@ add_custom_command(
|
||||||
COMMAND_EXPAND_LISTS
|
COMMAND_EXPAND_LISTS
|
||||||
)
|
)
|
||||||
add_custom_target(llext-edk DEPENDS ${llext_edk_file})
|
add_custom_target(llext-edk DEPENDS ${llext_edk_file})
|
||||||
|
endif()
|
||||||
|
|
||||||
# @Intent: Set compiler specific flags for standard C/C++ includes
|
# @Intent: Set compiler specific flags for standard C/C++ includes
|
||||||
# Done at the very end, so any other system includes which may
|
# Done at the very end, so any other system includes which may
|
||||||
|
|
|
@ -126,7 +126,16 @@ source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menu "Linkable loadable Extension Development Kit (EDK)"
|
menuconfig LLEXT_EDK
|
||||||
|
bool "Linkable loadable Extension Development Kit (EDK)"
|
||||||
|
default y if LLEXT
|
||||||
|
help
|
||||||
|
Enable the generation of an Extension Development Kit (EDK) for the
|
||||||
|
Linkable Loadable Extension subsystem. The EDK is an archive that
|
||||||
|
contains the necessary files and build settings to build extensions
|
||||||
|
for Zephyr without the need to have the full Zephyr source tree.
|
||||||
|
|
||||||
|
if LLEXT_EDK
|
||||||
|
|
||||||
config LLEXT_EDK_NAME
|
config LLEXT_EDK_NAME
|
||||||
string "Name for llext EDK (Extension Development Kit)"
|
string "Name for llext EDK (Extension Development Kit)"
|
||||||
|
@ -145,4 +154,4 @@ config LLEXT_EDK_USERSPACE_ONLY
|
||||||
to be used by userspace only extensions, this option will make EDK stubs
|
to be used by userspace only extensions, this option will make EDK stubs
|
||||||
not contain the routing code, and only generate the userspace one.
|
not contain the routing code, and only generate the userspace one.
|
||||||
|
|
||||||
endmenu
|
endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue