Skip to content

Commit

Permalink
fix to always hide symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
JinHelin404 committed Sep 12, 2024
1 parent 649b3de commit fb6a833
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions cpp/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,11 @@ file(MAKE_DIRECTORY ${root_directory}/releases)
add_library(gluten SHARED ${SPARK_COLUMNAR_PLUGIN_SRCS})
add_dependencies(gluten jni_proto)

if(ENABLE_GLUTEN_VCPKG)
# Hide symbols of some static dependencies. Otherwise, if such dependencies
# are already statically linked to libvelox.so, a runtime error will be
# reported: xxx is being linked both statically and dynamically.
target_link_options(
gluten PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)
target_link_libraries(gluten PRIVATE google::glog)
endif()
# Hide symbols of some static dependencies. Otherwise, if such dependencies
# are already statically linked to libvelox.so, a runtime error will be
# reported: xxx is being linked both statically and dynamically.
target_link_options(
gluten PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
execute_process(
Expand Down Expand Up @@ -318,6 +315,7 @@ endif()

target_link_libraries(gluten PUBLIC Arrow::parquet Arrow::arrow
Arrow::arrow_bundled_dependencies)
target_link_libraries(gluten PRIVATE google::glog)

install(TARGETS gluten DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/libhdfs.so
Expand Down

0 comments on commit fb6a833

Please sign in to comment.