File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ OPTIND=1 # Reset in case getopts has been used previously in the shell.
55
66# Initialize our own variables:
77TARGET=" X86"
8+ BUILD_TYPE=" Release"
89INSTALL_PREFIX=" /usr/local"
910NPROC=1
1011USE_CCACHE=" 0"
@@ -24,15 +25,17 @@ function print_usage {
2425 echo " " ;
2526 echo " Options:" ;
2627 echo " -t Target to build for (X86, AArch64, PowerPC). Default: X86" ;
28+ echo " -d CMake build type. Default: Release" ;
2729 echo " -p Install prefix. Default: /usr/local" ;
2830 echo " -n Number of parallel jobs. Default: 1" ;
2931 echo " -c Use ccache. Default: 0 - do not use ccache" ;
3032 echo " -s Use sudo to install. Default: 0 - do not use sudo" ;
3133}
3234
33- while getopts " t:p:n:c?s?" opt; do
35+ while getopts " t:d: p:n:c?s?" opt; do
3436 case " $opt " in
3537 t) TARGET=$OPTARG ;;
38+ d) BUILD_TYPE=$OPTARG ;;
3639 p) INSTALL_PREFIX=$OPTARG ;;
3740 n) NPROC=$OPTARG ;;
3841 c) USE_CCACHE=" 1" ;;
@@ -42,7 +45,7 @@ while getopts "t:p:n:c?s?" opt; do
4245done
4346
4447CMAKE_OPTIONS=" -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
45- -DCMAKE_BUILD_TYPE=Release \
48+ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
4649 -DCMAKE_CXX_COMPILER=$INSTALL_PREFIX /bin/clang++ \
4750 -DCMAKE_C_COMPILER=$INSTALL_PREFIX /bin/clang \
4851 -DLLVM_TARGETS_TO_BUILD=$TARGET "
You can’t perform that action at this time.
0 commit comments