Handle public CMake dependencies in more contexts#22385
Draft
vyasr wants to merge 16 commits intorapidsai:mainfrom
Draft
Handle public CMake dependencies in more contexts#22385vyasr wants to merge 16 commits intorapidsai:mainfrom
vyasr wants to merge 16 commits intorapidsai:mainfrom
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
When building shared libcudf with static dependencies, rmm and rapids_logger are absorbed into the shared library using --whole-archive to ensure all symbols are exported. This commit adds: - Conditional WHOLE_ARCHIVE linkage for rmm/rapids_logger - BUILD_INTERFACE wrapping to hide absorbed static deps from install - Transitive dependency promotion for absorbed libraries - Export set merging (rmm-exports/rapids_logger-exports into cudf-exports) - Conda/pre-installed shared library detection (TYPE introspection) - DSO header installation for standalone mode - get_rmm.cmake: full EXCLUDE_FROM_ALL support + conda fix - get_nvtx.cmake: remove export sets (rmm handles nvtx publicly) - rapids_logger: conditional static build + export package for conda
WHOLE_ARCHIVE is only meaningful when absorbing a static library into a shared library. Applying it to a shared library target triggers CMake warnings. Gate both WHOLE_ARCHIVE and BUILD_INTERFACE behind the TYPE==STATIC_LIBRARY check so the genex is never generated for pre-installed shared deps (e.g. conda rmm/rapids_logger).
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test |
Contributor
Author
|
/ok to test |
1 similar comment
Contributor
Author
|
/ok to test |
d9cb37e to
26b171d
Compare
Two issues caused CI failure: 1. foreach(_mode BUILD INSTALL) used uppercase, but rapids-cmake export targets use lowercase names (rapids_export_build_*, rapids_export_install_*). The if(NOT TARGET) check silently skipped the entire merge block. 2. get_nvtx.cmake was missing BUILD_EXPORT_SET/INSTALL_EXPORT_SET args. When rmm is absorbed into libcudf, its public dep nvtx3-cpp must be in an export set for CMake's install(EXPORT) validation to pass.
When static deps (rmm, rapids_logger) are absorbed into libcudf.so via whole-archive, they are not installed separately. The export-set merging loop was copying rmm-exports' install packages (including rapids_logger) into cudf-exports, producing a find_dependency(rapids_logger) that would fail for consumers of an installed standalone build. Skip packages matching _absorbed_deps names when merging install-side export set metadata.
26b171d to
0331ad0
Compare
Contributor
Author
|
/ok to test |
When promoting an absorbed library's transitive deps into cudf's public interface, filter out deps that are themselves absorbed (already linked via whole-archive) and LINK_ONLY entries (private link deps already statically linked into the absorbed library).
Contributor
Author
|
/ok to test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Depends on #22341
Checklist