Skip to content

Commit aece9f7

Browse files
committed
Filter absorbed and private deps from promoted interface libraries
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).
1 parent 0331ad0 commit aece9f7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cpp/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,8 +1110,14 @@ if(BUILD_SHARED_LIBS)
11101110
set(_${_dep}_link $<BUILD_INTERFACE:$<LINK_LIBRARY:WHOLE_ARCHIVE,${_dep}::${_dep}>>)
11111111

11121112
# Promote the absorbed library's public transitive deps into cudf's public interface.
1113+
# Filter out deps that are themselves absorbed — they are already linked via whole-archive.
1114+
# Also filter LINK_ONLY entries — those are private link deps already statically linked in.
11131115
get_target_property(_iface_libs ${_dep}::${_dep} INTERFACE_LINK_LIBRARIES)
11141116
if(_iface_libs)
1117+
foreach(_absorbed IN LISTS _absorbed_deps)
1118+
list(REMOVE_ITEM _iface_libs ${_absorbed}::${_absorbed})
1119+
endforeach()
1120+
list(FILTER _iface_libs EXCLUDE REGEX "\\\$<LINK_ONLY:")
11151121
target_link_libraries(cudf PUBLIC ${_iface_libs})
11161122
endif()
11171123

0 commit comments

Comments
 (0)