Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
5 changes: 5 additions & 0 deletions ci/scripts/python_build_emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ cp -aL "${source_dir}" "${python_build_dir}"
# emcmake so we unset them
unset LDFLAGS CFLAGS CXXFLAGS CPPFLAGS

# Keep WebAssembly function names only in CI to limit wheel size
if [ "${GITHUB_ACTIONS:-}" = "true" ]; then
export PYARROW_CXXFLAGS="${PYARROW_CXXFLAGS:+${PYARROW_CXXFLAGS} }--profiling-funcs"
fi

pushd "${python_build_dir}"
pyodide build
popd
13 changes: 11 additions & 2 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2447,7 +2447,10 @@ macro(build_substrait)
set(SUBSTRAIT_INCLUDES ${SUBSTRAIT_CPP_DIR} ${PROTOBUF_INCLUDE_DIR})

add_library(substrait STATIC ${SUBSTRAIT_SOURCES})
set_target_properties(substrait PROPERTIES POSITION_INDEPENDENT_CODE ON)
# Match Protobuf's visibility because target contains generated Protobuf code
set_target_properties(substrait PROPERTIES POSITION_INDEPENDENT_CODE ON
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON)
target_compile_options(substrait PRIVATE "${SUBSTRAIT_SUPPRESSED_FLAGS}")
target_include_directories(substrait PUBLIC ${SUBSTRAIT_INCLUDES})
target_link_libraries(substrait PUBLIC ${ARROW_PROTOBUF_LIBPROTOBUF})
Expand Down Expand Up @@ -3888,6 +3891,10 @@ function(build_orc)

fetchcontent_makeavailable(orc)

# ORC compiles generated Protobuf code into its static library
set_target_properties(orc PROPERTIES CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON)

# ORC 2.2.1 unconditionally adds /std:c++17 on MSVC via
# add_compile_options, which overrides CMAKE_CXX_STANDARD and causes
# ABI mismatches with protobuf (GlobalEmptyStringConstexpr vs
Expand Down Expand Up @@ -3979,7 +3986,9 @@ function(build_orc)
"-DZSTD_LIBRARY=$<TARGET_FILE:${ARROW_ZSTD_LIBZSTD}>"
"-DZLIB_HOME=${ORC_ZLIB_ROOT}"
"-DZLIB_INCLUDE_DIR=$<TARGET_PROPERTY:ZLIB::ZLIB,INTERFACE_INCLUDE_DIRECTORIES>"
"-DZLIB_LIBRARY=$<TARGET_FILE:ZLIB::ZLIB>")
"-DZLIB_LIBRARY=$<TARGET_FILE:ZLIB::ZLIB>"
-DCMAKE_CXX_VISIBILITY_PRESET=hidden
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you sort this argument list?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh... those two lines are sorted now!


# Work around CMake bug
file(MAKE_DIRECTORY ${ORC_INCLUDE_DIR})
Expand Down
Loading