Skip to content

Commit 8355a53

Browse files
softwareckilgirdwood
authored andcommitted
cmake: module: llext: Add CONFIG_LLEXT check to all module build scripts
Ensure that modules are only built as llext when CONFIG_LLEXT is enabled. Previously, if a module was configured to be built as a loadable module (config option set to 'm') while CONFIG_LLEXT was disabled, the build would fail due to missing support for llext. This change adds a conditional check to all relevant CMake files to prevent such errors. It aligns module building behavior with CONFIG_LIBRARY_DEFAULT_MODULAR, which controls whether modules are built as loadable by default. The default behavior depends on whether CONFIG_LLEXT is enabled in the configuration. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent 7c490cd commit 8355a53

File tree

27 files changed

+29
-29
lines changed

27 files changed

+29
-29
lines changed

src/audio/aria/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
if(CONFIG_COMP_ARIA STREQUAL "m")
3+
if(CONFIG_COMP_ARIA STREQUAL "m" AND DEFINED CONFIG_LLEXT)
44
add_subdirectory(llext ${PROJECT_BINARY_DIR}/aria_llext)
55
add_dependencies(app aria)
66
else()

src/audio/asrc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
if(CONFIG_COMP_ASRC STREQUAL "m")
3+
if(CONFIG_COMP_ASRC STREQUAL "m" AND DEFINED CONFIG_LLEXT)
44
add_subdirectory(llext ${PROJECT_BINARY_DIR}/asrc_llext)
55
add_dependencies(app asrc)
66
return()

src/audio/codec/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
is_zephyr(zephyr)
44
if(zephyr) ### Zephyr ###
55

6-
if(CONFIG_DTS_CODEC STREQUAL "m")
6+
if(CONFIG_DTS_CODEC STREQUAL "m" AND DEFINED CONFIG_LLEXT)
77
add_subdirectory(dts/llext ${PROJECT_BINARY_DIR}/dts_llext)
88
add_dependencies(app dts)
99

src/audio/crossover/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
if(CONFIG_COMP_CROSSOVER STREQUAL "m")
3+
if(CONFIG_COMP_CROSSOVER STREQUAL "m" AND DEFINED CONFIG_LLEXT)
44
add_subdirectory(llext ${PROJECT_BINARY_DIR}/crossover_llext)
55
add_dependencies(app crossover)
66
return()

src/audio/dcblock/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(CONFIG_COMP_DCBLOCK STREQUAL "m")
1+
if(CONFIG_COMP_DCBLOCK STREQUAL "m" AND DEFINED CONFIG_LLEXT)
22
add_subdirectory(llext ${PROJECT_BINARY_DIR}/dcblock_llext)
33
add_dependencies(app dcblock)
44
return()

src/audio/drc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
if(CONFIG_COMP_DRC STREQUAL "m")
3+
if(CONFIG_COMP_DRC STREQUAL "m" AND DEFINED CONFIG_LLEXT)
44
add_subdirectory(llext ${PROJECT_BINARY_DIR}/drc_llext)
55
add_dependencies(app drc)
66
else()

src/audio/eq_fir/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
if(CONFIG_COMP_FIR STREQUAL "m")
3+
if(CONFIG_COMP_FIR STREQUAL "m" AND DEFINED CONFIG_LLEXT)
44

55
add_subdirectory(llext ${PROJECT_BINARY_DIR}/eq_fir_llext)
66
add_dependencies(app eq_fir)

src/audio/eq_iir/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
if(CONFIG_COMP_IIR STREQUAL "m")
3+
if(CONFIG_COMP_IIR STREQUAL "m" AND DEFINED CONFIG_LLEXT)
44

55
add_subdirectory(llext ${PROJECT_BINARY_DIR}/eq_iir_llext)
66
add_dependencies(app eq_iir)

src/audio/google/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if(zephyr) ### Zephyr ###
1414
google_hotword_detect.c
1515
)
1616

17-
if(CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING STREQUAL "m")
17+
if(CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING STREQUAL "m" AND DEFINED CONFIG_LLEXT)
1818
add_subdirectory(llext_rtc
1919
${PROJECT_BINARY_DIR}/google_rtc_audio_processing_llext)
2020
add_dependencies(app google_rtc_audio_processing)
@@ -37,7 +37,7 @@ if(zephyr) ### Zephyr ###
3737
endif()
3838
endif()
3939

40-
if(CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING STREQUAL "m")
40+
if(CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING STREQUAL "m" AND DEFINED CONFIG_LLEXT)
4141
add_subdirectory(llext_ctc
4242
${PROJECT_BINARY_DIR}/google_ctc_audio_processing_llext)
4343
add_dependencies(app google_ctc_audio_processing)

src/audio/igo_nr/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
if(CONFIG_COMP_IGO_NR STREQUAL "m")
3+
if(CONFIG_COMP_IGO_NR STREQUAL "m" AND DEFINED CONFIG_LLEXT)
44
add_subdirectory(llext ${PROJECT_BINARY_DIR}/igo_nr_llext)
55
add_dependencies(app igo_nr)
66
return()

0 commit comments

Comments
 (0)