-
Notifications
You must be signed in to change notification settings - Fork 349
cmake: module: llext: Add CONFIG_LLEXT check to all module build scripts #10253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds conditional checks to prevent module build failures when CONFIG_LLEXT is disabled but modules are configured to build as loadable extensions.
- Adds
AND DEFINED CONFIG_LLEXTchecks to all module CMake conditional statements - Prevents build errors when modules are set to 'm' (loadable) but llext support is unavailable
- Ensures consistent behavior across all audio components, math modules, debug tools, and sample code
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/samples/audio/CMakeLists.txt | Add llext check for smart amp test module |
| src/probe/CMakeLists.txt | Add llext check for probe module |
| src/math/CMakeLists.txt | Add llext checks for FIR and IIR math modules |
| src/debug/tester/CMakeLists.txt | Add llext check for component tester module |
| src/audio/volume/CMakeLists.txt | Add llext check for volume component |
| src/audio/tensorflow/CMakeLists.txt | Add llext check for TensorFlow component |
| src/audio/template/CMakeLists.txt | Add llext check for template component |
| src/audio/tdfb/CMakeLists.txt | Add llext check for TDFB component |
| src/audio/src/CMakeLists.txt | Add llext check for SRC component |
| src/audio/selector/CMakeLists.txt | Add llext check for selector component |
| src/audio/rtnr/CMakeLists.txt | Add llext check for RTNR component |
| src/audio/mux/CMakeLists.txt | Add llext check for mux component |
| src/audio/multiband_drc/CMakeLists.txt | Add llext check for multiband DRC component |
| src/audio/module_adapter/CMakeLists.txt | Add llext check for waves codec module |
| src/audio/mixin_mixout/CMakeLists.txt | Add llext check for mixin/mixout component |
| src/audio/mfcc/CMakeLists.txt | Add llext check for MFCC component |
| src/audio/level_multiplier/CMakeLists.txt | Add llext check for level multiplier component |
| src/audio/igo_nr/CMakeLists.txt | Add llext check for IGO NR component |
| src/audio/google/CMakeLists.txt | Add llext checks for Google RTC and CTC audio processing |
| src/audio/eq_iir/CMakeLists.txt | Add llext check for IIR equalizer component |
| src/audio/eq_fir/CMakeLists.txt | Add llext check for FIR equalizer component |
| src/audio/drc/CMakeLists.txt | Add llext check for DRC component |
| src/audio/dcblock/CMakeLists.txt | Add llext check for DC block component |
| src/audio/crossover/CMakeLists.txt | Add llext check for crossover component |
| src/audio/codec/CMakeLists.txt | Add llext check for DTS codec |
| src/audio/asrc/CMakeLists.txt | Add llext check for ASRC component |
| src/audio/aria/CMakeLists.txt | Add llext check for ARIA component |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
tmleman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change is definitely needed. The only downside is that with this solution, it's easy to forget about it when adding a new module. We should look for a more generic solution later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will change the behaviour of build system.
Right now such dependency is used to ensure it works without LLEXT:
default m if LIBRARY_DEFAULT_MODULAR (which depends on LLEXT)
default y (to build as built-in without LLEXT)
The problem is only with TESTER config which forces 'm' in platform config.
The new problem with new approach is that it will build TESTER module as built-in instead of not building at all.
For such case we have default n for TESTER to ensure it wont build as built-in but this PR will change that.
@abonislawski correct - with current PTL+ configurations. But what about LNL? It only sets DRC to "m" in its .config, so would it also fail if LLEXT is unselected? In general - using a configuration with "LLEXT=n" and some options set to "m" shouldn't break building, should it? In our use-case it seems logical to allow each module to decide what to do then: convert it to "y" or to "n" even though it can be argued, that this should be universal. But I think it would be acceptable to force tester to "n" in such cases. Another option to consider - we could explicitly check for "MODULES=y" and "LLEXT=n" and fail such builds as invalid. |
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, but @kv2019i I assume it aligns with teh Kconfig updates ?
The release build for LNL should be llexyt=y and DRC=m ? Are we saying its not ? |
kv2019i
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No conflict with the config updates @lgirdwood , I'm good.
Ensure that modules are only built as llext when
CONFIG_LLEXTis enabled.Previously, if a module was configured to be built as a loadable module (config option set to 'm') while
CONFIG_LLEXTwas 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 whetherCONFIG_LLEXTis enabled in the configuration.