Skip to content
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

[GLUTEN-8611][VL] Set VELOX_GFLAGS_TYPE by checking GLUTEN_VCPKG_ENABLED in build_velox.sh #8612

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion dev/builddeps-veloxbe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function build_velox {
cd $GLUTEN_DIR/ep/build-velox/src
# When BUILD_TESTS is on for gluten cpp, we need turn on VELOX_BUILD_TEST_UTILS via build_test_utils.
./build_velox.sh --enable_s3=$ENABLE_S3 --enable_gcs=$ENABLE_GCS --build_type=$BUILD_TYPE --enable_hdfs=$ENABLE_HDFS \
--enable_abfs=$ENABLE_ABFS --build_test_utils=$BUILD_TESTS \
--enable_abfs=$ENABLE_ABFS --enable_vcpkg=$ENABLE_VCPKG --build_test_utils=$BUILD_TESTS \
--build_tests=$BUILD_VELOX_TESTS --build_benchmarks=$BUILD_VELOX_BENCHMARKS --num_threads=$NUM_THREADS \
--velox_home=$VELOX_HOME
}
Expand Down
15 changes: 14 additions & 1 deletion ep/build-velox/src/build_velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

set -exu
# New build option may need to be included in get_build_summary to ensure EP build cache workable.
# Path to the Velox source code.
VELOX_HOME=""
# Enable S3 connector.
ENABLE_S3=OFF
# Enable GCS connector.
Expand All @@ -24,15 +26,19 @@ ENABLE_GCS=OFF
ENABLE_HDFS=OFF
# Enable ABFS connector.
ENABLE_ABFS=OFF
# CMake build type for Velox.
BUILD_TYPE=release
VELOX_HOME=""
# May be deprecated in Gluten build.
ENABLE_BENCHMARK=OFF
# May be deprecated in Gluten build.
ENABLE_TESTS=OFF
# Set to ON for gluten cpp test build.
BUILD_TEST_UTILS=OFF
# Enable vcpkg for Gluten can affect Velox cmake build options such as gflags library type.
ENABLE_VCPKG=OFF
# Number of threads to use for building.
NUM_THREADS=""

OTHER_ARGUMENTS=""

OS=`uname -s`
Expand Down Expand Up @@ -76,6 +82,10 @@ for arg in "$@"; do
ENABLE_BENCHMARK=("${arg#*=}")
shift # Remove argument name from processing
;;
--enable_vcpkg=*)
ENABLE_VCPKG=("${arg#*=}")
shift # Remove argument name from processing
;;
--num_threads=*)
NUM_THREADS=("${arg#*=}")
shift # Remove argument name from processing
Expand Down Expand Up @@ -117,6 +127,9 @@ function compile {
echo "ENABLE_BENCHMARK is ON. Disabling Tests, GCS and ABFS connectors if enabled."
COMPILE_OPTION="$COMPILE_OPTION -DVELOX_ENABLE_BENCHMARKS=ON"
fi
if [ $ENABLE_VCPKG == "ON" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems we can just rely on this check to see whether the below env variable is set:
if [ -n "${GLUTEN_VCPKG_ENABLED:-}" ];

COMPILE_OPTION="$COMPILE_OPTION -DVELOX_GFLAGS_TYPE=static"
fi

COMPILE_OPTION="$COMPILE_OPTION -DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
COMPILE_TYPE=$(if [[ "$BUILD_TYPE" == "debug" ]] || [[ "$BUILD_TYPE" == "Debug" ]]; then echo 'debug'; else echo 'release'; fi)
Expand Down
Loading