File tree Expand file tree Collapse file tree 1 file changed +14
-19
lines changed Expand file tree Collapse file tree 1 file changed +14
-19
lines changed Original file line number Diff line number Diff line change 33repo=intel/graph-compiler
44
55# Uncomment for script debug
6- # set -ex
6+ # set -x
77
88function print_usage() {
99 echo " Usage:"
@@ -13,34 +13,27 @@ function print_usage() {
1313 echo " [ -h | --help ] Print this message"
1414}
1515
16- args=$( getopt -a -o dlh --long dev,dyn,help -- " $@ " )
17- if [[ $? -gt 0 ]]; then
18- echo " first"
19- print_usage
20- fi
21-
2216DEV_BUILD=false
2317DYN_LINK=false
24- eval set -- ${args}
25- while :
26- do
27- case $1 in
18+ for arg in " $@ " ; do
19+ case $arg in
2820 -d | --dev)
2921 DEV_BUILD=true
30- shift ;;
22+ ;;
3123 -l | --dyn)
3224 DEV_BUILD=true
3325 DYN_LINK=true
34- shift ;;
26+ ;;
3527 -h | --help)
36- echo " in help"
3728 print_usage
38- shift ;;
29+ exit 0
30+ ;;
3931 # -- means the end of the arguments; drop this, and break out of the while loop
40- --) shift ; break ;;
41- * ) >&2 echo Unsupported option: $1
42- echo " in unsup"
43- print_usage ;;
32+ * )
33+ echo Unsupported option: $arg
34+ print_usage
35+ exit 1
36+ ;;
4437 esac
4538done
4639
132125if [ -z " $lit_path " ]; then
133126 echo " ========Warning======="
134127 echo " Lit not found. "
128+ echo " ======================"
135129fi
136130
137131cmake -S . -G Ninja -B build \
@@ -140,4 +134,5 @@ cmake -S . -G Ninja -B build \
140134 -DLLVM_EXTERNAL_LIT=$lit_path \
141135 -DFETCHCONTENT_BASE_DIR=$fetch_dir \
142136 -DGC_DEV_LINK_LLVM_DYLIB=$dylib
137+
143138cmake --build build --parallel $( nproc)
You can’t perform that action at this time.
0 commit comments