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

[Chore](build) add a environment variable DISABLE_JAVA_UDF #13588

Merged
merged 3 commits into from
Oct 25, 2022
Merged
Changes from all 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
25 changes: 11 additions & 14 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,13 @@ Usage: $0 <options>
--audit build audit loader. Default ON.
--spark-dpp build Spark DPP application. Default ON.
--hive-udf build Hive UDF library for Spark Load. Default ON.
--java-udf build Java UDF library. Default ON.
--clean clean and build target
-j build Backend parallel

Environment variables:
USE_AVX2 If the CPU does not support AVX2 instruction set, please set USE_AVX2=0. Default is ON.
STRIP_DEBUG_INFO If set STRIP_DEBUG_INFO=ON, the debug information in the compiled binaries will be stored separately in the 'be/lib/debug_info' directory. Default is OFF.

DISABLE_JAVA_UDF If set DISABLE_JAVA_UDF=ON, we will do not build binary with java-udf. Default is OFF.
Eg.
$0 build all
$0 --be build Backend
Expand All @@ -62,7 +61,7 @@ Usage: $0 <options>
$0 --fe --be --clean clean and build Frontend, Spark Dpp application and Backend
$0 --spark-dpp build Spark DPP application alone
$0 --broker build Broker
$0 --be --fe --java-udf build Backend, Frontend, Spark Dpp application and Java UDF library
$0 --be --fe build Backend, Frontend, Spark Dpp application and Java UDF library

USE_AVX2=0 $0 --be build Backend and not using AVX2 instruction.
USE_AVX2=0 STRIP_DEBUG_INFO=ON $0 build all and not using AVX2 instruction, and strip the debug info for Backend
Expand Down Expand Up @@ -113,7 +112,6 @@ if ! OPTS="$(getopt \
-l 'audit' \
-l 'meta-tool' \
-l 'spark-dpp' \
-l 'java-udf' \
-l 'hive-udf' \
-l 'clean' \
-l 'help' \
Expand All @@ -131,7 +129,7 @@ BUILD_BROKER=0
BUILD_AUDIT=0
BUILD_META_TOOL='OFF'
BUILD_SPARK_DPP=0
BUILD_JAVA_UDF=0
BUILD_JAVA_UDF=1
BUILD_HIVE_UDF=0
CLEAN=0
HELP=0
Expand All @@ -145,7 +143,6 @@ if [[ "$#" == 1 ]]; then
BUILD_AUDIT=1
BUILD_META_TOOL='OFF'
BUILD_SPARK_DPP=1
BUILD_JAVA_UDF=1
BUILD_HIVE_UDF=1
CLEAN=0
else
Expand All @@ -154,13 +151,11 @@ else
--fe)
BUILD_FE=1
BUILD_SPARK_DPP=1
BUILD_JAVA_UDF=1
BUILD_HIVE_UDF=1
shift
;;
--be)
BUILD_BE=1
BUILD_JAVA_UDF=1
shift
;;
--broker)
Expand All @@ -179,12 +174,6 @@ else
BUILD_SPARK_DPP=1
shift
;;
--java-udf)
BUILD_JAVA_UDF=1
BUILD_FE=1
BUILD_SPARK_DPP=1
shift
;;
--hive-udf)
BUILD_HIVE_UDF=1
shift
Expand Down Expand Up @@ -296,6 +285,10 @@ if [[ -z "${USE_DWARF}" ]]; then
USE_DWARF='OFF'
fi

if [[ -z "${DISABLE_JAVA_UDF}" ]]; then
DISABLE_JAVA_UDF='OFF'
fi

if [[ -z "${RECORD_COMPILER_SWITCHES}" ]]; then
RECORD_COMPILER_SWITCHES='OFF'
fi
Expand All @@ -304,6 +297,10 @@ if [[ "${BUILD_JAVA_UDF}" -eq 1 && "$(uname -s)" == 'Darwin' ]]; then
BUILD_JAVA_UDF=0
fi

if [[ "${DISABLE_JAVA_UDF}" == "ON" ]]; then
BUILD_JAVA_UDF=0
fi

echo "Get params:
BUILD_FE -- ${BUILD_FE}
BUILD_BE -- ${BUILD_BE}
Expand Down