Copilot commented on code in PR #13168:
URL: https://github.com/apache/gluten/pull/13168#discussion_r4301328751
##########
cpp/core/CMakeLists.txt:
##########
@@ -152,8 +151,11 @@ set(SPARK_COLUMNAR_PLUGIN_SRCS
jni/TaskContextJniWrapper.cc)
file(MAKE_DIRECTORY ${root_directory}/releases)
-add_library(gluten SHARED ${SPARK_COLUMNAR_PLUGIN_SRCS})
-add_dependencies(gluten jni_proto)
+add_library(gluten_core_impl OBJECT ${SPARK_COLUMNAR_PLUGIN_SRCS})
+set_target_properties(gluten_core_impl PROPERTIES POSITION_INDEPENDENT_CODE ON)
+add_dependencies(gluten_core_impl jni_proto)
+add_library(gluten SHARED jni/JniWrapper.cc)
+target_link_libraries(gluten PRIVATE gluten_core_impl)
Review Comment:
Making this link PRIVATE stops `gluten` from exporting the core and
generated-protobuf include directories. Bolt's shared and optional static
targets still link `gluten` (`cpp/bolt/CMakeLists.txt:284–315`), but their
sources include `compute/Runtime.h` and `substrait/plan.pb.h`. Without those
include paths, Bolt builds fail to compile. Keep this link PUBLIC to preserve
the existing interface; a transitive object-library dependency propagates usage
requirements without embedding the core objects again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]