File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,16 @@ VER_TORCHAUDIO=""
99VER_IPEX=" v2.0.0+cpu"
1010
1111# Check existance of required Linux commands
12- for CMD in gcc g++ python git; do
12+ for CMD in gcc g++ python git nproc ; do
1313 command -v ${CMD} || (echo " Error: Command \" ${CMD} \" not found." ; exit 4)
1414done
1515echo " You are using GCC: $( gcc --version | grep gcc) "
1616
17+ MAX_JOBS_VAR=$( nproc)
18+ if [ ! -z " ${MAX_JOBS} " ]; then
19+ MAX_JOBS_VAR=${MAX_JOBS}
20+ fi
21+
1722# Save current directory path
1823BASEFOLDER=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
1924cd ${BASEFOLDER}
5661mkdir build
5762cd build
5863cmake -G " Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=" -D_GLIBCXX_USE_CXX11_ABI=${ABI} " -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF ../llvm/
59- cmake --build . -j $( nproc )
60- LLVM_ROOT=` pwd` /../release
64+ cmake --build . -j ${MAX_JOBS_VAR}
65+ LLVM_ROOT=" $( pwd) /../release"
6166if [ -d ${LLVM_ROOT} ]; then
6267 rm -rf ${LLVM_ROOT}
6368fi
You can’t perform that action at this time.
0 commit comments