[CMake] Utils.cmake, function name kernel_link_options() and target_link_options_shared_lib() misleading
@larryliu0820 is already working on this.
Since Apr 25, 2025.
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
🐛 Describe the bug
Seems that kernel_link_options really means whole-archive (keeping all symbols, don't prune due to no direct usage!) and target_link_options_shared_lib() is a wrapper for kernel_link_options().
Note that this is not accurate. For kernel, we need to whole-archive to prevent from missing symbol. For shared lib, most likely, we need to keep symbols, but not necessarily all of them (can depend on other dylib definition).
My suggestion is change the name a bit, like "link_options_whole".
Also would love to have some tool, to check if there is any duplicated symbol in our .a. And also .so.
Versions
1bd72607081ddc1e0f42eeb14b02b640395a598c
cc @larryliu0820 @jathu
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.