Skip to content

Commit

Permalink
llext: add a parameter to sof_llext_build()
Browse files Browse the repository at this point in the history
Add a parameter to sof_llext_build() to support adding modules to
libraries. Specifying a LIB parameter in that function with a single
value adds that module to a library with that name.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh committed Dec 9, 2024
1 parent 7cad400 commit 8ef84f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ endfunction()
# of the .text section as arguments.
function(sof_llext_build module)
set(multi_args SOURCES)
set(single_args LIB)
cmake_parse_arguments(PARSE_ARGV 1 SOF_LLEXT "${options}" "${single_args}" "${multi_args}")

cmake_path(SET SOF_BASE NORMALIZE ${APPLICATION_SOURCE_DIR}/..)
Expand All @@ -73,6 +74,10 @@ function(sof_llext_build module)
SOURCES ${SOF_LLEXT_SOURCES}
)

if(NOT "${SOF_LLEXT_LIB}" STREQUAL "")
file(WRITE ${PROJECT_BINARY_DIR}/${module}_llext/lib_name.txt ${SOF_LLEXT_LIB})
endif()

target_include_directories(${module}_llext_lib PRIVATE
"${SOF_BASE}/xtos/include"
"${SOF_BASE}/src/include"
Expand Down

0 comments on commit 8ef84f0

Please sign in to comment.