Skip to content

Commit

Permalink
[Chore](build) add a environment variable DISABLE_JAVA_UDF (apache#13588
Browse files Browse the repository at this point in the history
)
  • Loading branch information
BiteTheDDDDt authored Oct 25, 2022
1 parent 2c70b17 commit bd884d3
Showing 1 changed file with 11 additions and 14 deletions.
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

0 comments on commit bd884d3

Please sign in to comment.