Skip to content

[CMake] Utils.cmake, function name kernel_link_options() and target_link_options_shared_lib() misleading #10492

Open
@kirklandsign

Description

@kirklandsign

🐛 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

1bd7260

cc @larryliu0820 @jathu

Metadata

Metadata

Labels

module: build/installIssues related to the cmake and buck2 builds, and to installing ExecuTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

Status

To triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions