File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,14 +60,16 @@ if(NOT RABITQ_SUPPORTED)
6060 list (FILTER ALL_CORE_SRCS EXCLUDE REGEX ".*/algorithm/hnsw_rabitq/.*" )
6161endif ()
6262
63- # Always exclude algorithm/diskann implementation files from zvec_core.
64- # The DiskAnn algorithm is provided by the separate core_knn_diskann library
65- # (STATIC+SHARED, real on Linux x86_64, stub on other platforms). The static
66- # variant is whole-archived into _zvec.so for the Python wheel; the shared
67- # variant is used by C++ tools and tests. Including the sources here would
68- # cause duplicate symbols.
69- list (FILTER ALL_CORE_SRCS EXCLUDE REGEX ".*/algorithm/diskann/.*" )
63+ # Exclude algorithm/diskann implementation files from zvec_core when not
64+ # supported (matching the hnsw_rabitq pattern above). When DISKANN_SUPPORTED,
65+ # the diskann sources are packed into zvec_core directly, so libzvec_core.so
66+ # includes diskann symbols without needing a separate whole-archive step.
67+ # The standalone core_knn_diskann library (built by algorithm/diskann) is still
68+ # whole-archived into _zvec.so; since _zvec.so links zvec_core *normally*
69+ # (not --whole-archive), the linker skips zvec_core's diskann objects there
70+ # (symbols already resolved by core_knn_diskann_static) — no duplicates.
7071if (NOT DISKANN_SUPPORTED)
72+ list (FILTER ALL_CORE_SRCS EXCLUDE REGEX ".*/algorithm/diskann/.*" )
7173 list (FILTER ALL_CORE_SRCS EXCLUDE REGEX ".*/interface/indexes/diskann_index\\ .cc" )
7274endif ()
7375
You can’t perform that action at this time.
0 commit comments