Skip to content
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

[FEATURE] remove duplicated C files additions in CMake rules for src/audio/ modules #8606

Open
kv2019i opened this issue Dec 11, 2023 · 4 comments
Labels
enhancement New feature or request Zephyr Issues only observed with Zephyr integrated
Milestone

Comments

@kv2019i
Copy link
Collaborator

kv2019i commented Dec 11, 2023

Is your feature request related to a problem? Please describe.
The list of files to build is duplicated for the shared-library build. Once time in top-level
src/audio/CMakeLists.txt and second time in subfolders.

@kv2019i kv2019i added the enhancement New feature or request label Dec 11, 2023
@kv2019i kv2019i added this to the v2.9 milestone Dec 11, 2023
@marc-hb
Copy link
Collaborator

marc-hb commented Dec 11, 2023

Found in

Should probably be done before zephyr cleanup:


Originally posted by @marc-hb in #8595 (comment)

why do we need to enumerate sources twice, once in src/audio/CMakeLists.txt and then in src/audio/mux/CMakeLists.txt ?

Looks like @btian1 didn't know (I'm afraid he's submitting uncompiled search/replace) so I had a look at this myself. The answer is: src/audio/CMakeLists.txt code after line 119 is only for CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD. There is a very confusing return() on that line which makes the code after it not indented. So this is one of the explanation for the mass copy/paste/diverge.

Good thing I just added a Github Action for the ALSA plugin. It may still be incorrect but at least it will still compile?

This part of the CMake code is significantly more messy that the rest, it's going to be a huge effort to clean all that technical debt (if ever)

@marc-hb marc-hb changed the title [FEATURE] remove duplicated CMake rules for audio modules [FEATURE] remove duplicated C files additions in CMake rules for src/audio/ modules Jan 30, 2024
marc-hb added a commit to marc-hb/sof that referenced this issue Feb 29, 2024
Commit 7680a7b ("cmake: add testbench host build") added a
`return()` in the middle of `src/audio/CMakeLists.txt` to exclude some
C files from testbench compilation.

It wasn't easy to read already at the time. Now that the file has grown
bigger it's become even harder to spot and even more confusing.

Soon, thesofproject#8260 will also add Zephyr to this file which will make things
much worse.

Solve all this by moving testbench and plugin compilation to a new,
separate, `native.cmake` file.

Reported in thesofproject#8606

Signed-off-by: Marc Herbert <[email protected]>
@kv2019i
Copy link
Collaborator Author

kv2019i commented Mar 4, 2024

Stable-v2.9 branched, this didn't make the cut, bumping to 2.10.

@kv2019i kv2019i modified the milestones: v2.9, v2.10 Mar 4, 2024
@kv2019i kv2019i added the Zephyr Issues only observed with Zephyr integrated label Apr 9, 2024
@kv2019i
Copy link
Collaborator Author

kv2019i commented Jun 5, 2024

Stable branched for 2.10, so moving this to 2.11.

@kv2019i kv2019i modified the milestones: v2.10, v2.11 Jun 5, 2024
@kv2019i kv2019i modified the milestones: v2.11, v2.12 Sep 5, 2024
@kv2019i
Copy link
Collaborator Author

kv2019i commented Dec 13, 2024

Feature cutoff for v2.12, moving this to v2.13.

@kv2019i kv2019i modified the milestones: v2.12, v2.13 Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Zephyr Issues only observed with Zephyr integrated
Projects
None yet
Development

No branches or pull requests

4 participants