Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VL] Hide symbols defined by gflags for libvelox.so #7820

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion cpp/velox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ endif()

add_library(velox SHARED ${VELOX_SRCS})

if(ENABLE_GLUTEN_VCPKG)
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
# Hide symbols of static dependencies
target_link_options(
velox PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)
Expand Down
4 changes: 2 additions & 2 deletions cpp/velox/symbols.map
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
JNI_OnLoad;
JNI_OnUnload;
local:
# Hide symbols of static dependencies
*;
# Hide symbols from glog and gflags.
*google::*;
};
8 changes: 3 additions & 5 deletions cpp/velox/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ function(add_velox_test TEST_EXEC)
message(FATAL_ERROR "No sources specified for test ${TEST_NAME}")
endif()
add_executable(${TEST_EXEC} ${SOURCES} ${VELOX_TEST_COMMON_SRCS})
target_include_directories(
${TEST_EXEC} PRIVATE ${CMAKE_SOURCE_DIR}/velox ${CMAKE_SOURCE_DIR}/src
${VELOX_BUILD_PATH}/_deps/duckdb-src/src/include)
target_link_libraries(${TEST_EXEC} velox GTest::gtest GTest::gtest_main
google::glog)
target_include_directories(${TEST_EXEC} PRIVATE ${CMAKE_SOURCE_DIR}/velox
${CMAKE_SOURCE_DIR}/src)
target_link_libraries(${TEST_EXEC} velox GTest::gtest GTest::gtest_main)
gtest_discover_tests(${TEST_EXEC} DISCOVERY_MODE PRE_TEST)
endfunction()

Expand Down
Loading