Skip to content

GH-46338: [C++] Add compile step for Meson in cpp_build.sh #46339

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

Merged
merged 2 commits into from
May 22, 2025
Merged
Changes from 1 commit
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: 4 additions & 1 deletion ci/scripts/cpp_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ else
fi

if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
time meson install
time {
meson compile -j $[${n_jobs} + 1];
meson install;
}
Copy link
Member

Choose a reason for hiding this comment

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

We need only compile time because install time will not be slow:

Suggested change
time {
meson compile -j $[${n_jobs} + 1];
meson install;
}
time meson compile -j $[${n_jobs} + 1]
meson install

else
export CMAKE_BUILD_PARALLEL_LEVEL=${CMAKE_BUILD_PARALLEL_LEVEL:-$[${n_jobs} + 1]}
Copy link
Member

Choose a reason for hiding this comment

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

How about defining ARROW_BUILD_PARALLEL or something and use it as the default for Meson and CMake?

: ${ARROW_BUILD_PARALLEL:=$[${n_jobs} + 1]}
if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
  meson compile -j ${ARROW_BUILD_PARALLEL}
else
  export CMAKE_BUILD_PARALLEL_LEVEL=${ARROW_BUILD_PARALLEL}
fi

time cmake --build . --target install
Expand Down
Loading