Skip to content

Commit 074dd67

Browse files
committed
llext: don't build if CONFIG_LLEXT=n
Not all configurations need LLEXT, don't include LLEXT support in such cases. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent f53b41d commit 074dd67

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/include/sof/llext_manager.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@
1111
struct comp_driver;
1212
struct comp_ipc_config;
1313

14+
#if CONFIG_LLEXT
1415
uintptr_t llext_manager_allocate_module(struct processing_module *proc,
1516
const struct comp_ipc_config *ipc_config,
1617
const void *ipc_specific_config);
1718

1819
int llext_manager_free_module(const uint32_t component_id);
20+
#else
21+
#define llext_manager_allocate_module(proc, ipc_config, ipc_specific_config) 0
22+
#define llext_manager_free_module(component_id) 0
23+
#define llext_unload(ext) 0
24+
#endif
1925

2026
#endif

src/library_manager/lib_manager.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929

3030
#include <zephyr/cache.h>
3131
#include <zephyr/drivers/mm/system_mm.h>
32+
#if CONFIG_LLEXT
3233
#include <zephyr/llext/llext.h>
34+
#endif
3335

3436
#if CONFIG_LIBRARY_AUTH_SUPPORT
3537
#include <auth/intel_auth_api.h>

zephyr/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ zephyr_library_sources_ifdef(CONFIG_LIBRARY_MANAGER
648648
${SOF_SRC_PATH}/library_manager/lib_notification.c
649649
)
650650

651-
if (CONFIG_MM_DRV)
651+
if (CONFIG_MM_DRV AND CONFIG_LLEXT)
652652
zephyr_library_sources_ifdef(CONFIG_LIBRARY_MANAGER
653653
${SOF_SRC_PATH}/library_manager/llext_manager.c
654654
)

0 commit comments

Comments
 (0)