Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,17 @@ set(DORIS_DEPENDENCIES ${DORIS_DEPENDENCIES} clucene-contribs-lib)

if (ENABLE_PAIMON_CPP)
if (PAIMON_FACTORY_REGISTRY_LIBS)
set(DORIS_DEPENDENCIES ${DORIS_DEPENDENCIES}
-Wl,--whole-archive
${PAIMON_FACTORY_REGISTRY_LIBS}
-Wl,--no-whole-archive)
if (APPLE)
foreach(lib ${PAIMON_FACTORY_REGISTRY_LIBS})
set(DORIS_DEPENDENCIES ${DORIS_DEPENDENCIES}
-Wl,-force_load,$<TARGET_FILE:${lib}>)
endforeach()
else()
set(DORIS_DEPENDENCIES ${DORIS_DEPENDENCIES}
-Wl,--whole-archive
${PAIMON_FACTORY_REGISTRY_LIBS}
-Wl,--no-whole-archive)
endif()
endif()

# paimon-cpp internal dependencies (renamed with _paimon suffix)
Expand Down
9 changes: 7 additions & 2 deletions be/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,13 @@ add_subdirectory(storage/index/ann)

add_executable(doris_be_test ${UT_FILES})

target_link_libraries(doris_be_test ${TEST_LINK_LIBS}
-Wl,--whole-archive vector_search_test -Wl,--no-whole-archive)
if (APPLE)
target_link_libraries(doris_be_test ${TEST_LINK_LIBS}
-Wl,-force_load,$<TARGET_FILE:vector_search_test>)
else()
target_link_libraries(doris_be_test ${TEST_LINK_LIBS}
-Wl,--whole-archive vector_search_test -Wl,--no-whole-archive)
endif()
set_target_properties(doris_be_test PROPERTIES COMPILE_FLAGS "-fno-access-control")
target_compile_options(doris_be_test PRIVATE -include gtest/gtest.h -Wno-shadow -Wno-shadow-field)

Expand Down
Loading