@@ -2447,13 +2447,10 @@ macro(build_substrait)
24472447 set (SUBSTRAIT_INCLUDES ${SUBSTRAIT_CPP_DIR} ${PROTOBUF_INCLUDE_DIR} )
24482448
24492449 add_library (substrait STATIC ${SUBSTRAIT_SOURCES} )
2450- set_target_properties (substrait PROPERTIES POSITION_INDEPENDENT_CODE ON )
2451- if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" )
2452- # Match Protobuf's visibility so duplicate inline definitions can't be
2453- # selected with different visibility when linking a side module (GH-50774)
2454- set_target_properties (substrait PROPERTIES CXX_VISIBILITY_PRESET hidden
2455- VISIBILITY_INLINES_HIDDEN ON )
2456- endif ()
2450+ # Match Protobuf's visibility because target contains generated Protobuf code
2451+ set_target_properties (substrait PROPERTIES POSITION_INDEPENDENT_CODE ON
2452+ CXX_VISIBILITY_PRESET hidden
2453+ VISIBILITY_INLINES_HIDDEN ON )
24572454 target_compile_options (substrait PRIVATE "${SUBSTRAIT_SUPPRESSED_FLAGS} " )
24582455 target_include_directories (substrait PUBLIC ${SUBSTRAIT_INCLUDES} )
24592456 target_link_libraries (substrait PUBLIC ${ARROW_PROTOBUF_LIBPROTOBUF} )
@@ -3894,11 +3891,9 @@ function(build_orc)
38943891
38953892 fetchcontent_makeavailable (orc)
38963893
3897- if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" )
3898- # ORC compiles generated Protobuf code into its static library
3899- set_target_properties (orc PROPERTIES CXX_VISIBILITY_PRESET hidden
3900- VISIBILITY_INLINES_HIDDEN ON )
3901- endif ()
3894+ # ORC compiles generated Protobuf code into its static library
3895+ set_target_properties (orc PROPERTIES CXX_VISIBILITY_PRESET hidden
3896+ VISIBILITY_INLINES_HIDDEN ON )
39023897
39033898 # ORC 2.2.1 unconditionally adds /std:c++17 on MSVC via
39043899 # add_compile_options, which overrides CMAKE_CXX_STANDARD and causes
@@ -3991,11 +3986,9 @@ function(build_orc)
39913986 "-DZSTD_LIBRARY=$<TARGET_FILE :${ARROW_ZSTD_LIBZSTD} >"
39923987 "-DZLIB_HOME=${ORC_ZLIB_ROOT} "
39933988 "-DZLIB_INCLUDE_DIR=$<TARGET_PROPERTY :ZLIB ::ZLIB ,INTERFACE_INCLUDE_DIRECTORIES >"
3994- "-DZLIB_LIBRARY=$<TARGET_FILE :ZLIB ::ZLIB >" )
3995- if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" )
3996- list (APPEND ORC_CMAKE_ARGS -DCMAKE_CXX_VISIBILITY_PRESET=hidden
3997- -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON )
3998- endif ()
3989+ "-DZLIB_LIBRARY=$<TARGET_FILE :ZLIB ::ZLIB >"
3990+ -DCMAKE_CXX_VISIBILITY_PRESET=hidden
3991+ -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON )
39993992
40003993 # Work around CMake bug
40013994 file (MAKE_DIRECTORY ${ORC_INCLUDE_DIR} )
0 commit comments