Skip to content

Commit 0a8b69f

Browse files
tianshuo78520aluotao1
authored andcommitted
Fix mac build nproc command not found in release1.5 (#18402)
* fix mac build error * test=develop * fix * change nproc 8 * test=release/1.5
1 parent ad6a51f commit 0a8b69f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

paddle/scripts/paddle_build.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,17 @@ function check_style() {
292292
#=================================================
293293

294294
function build_base() {
295-
parallel_number=`nproc`
296-
if [[ "$1" != "" ]]; then
295+
if [ "$SYSTEM" == "Linux" ];then
296+
parallel_number=`nproc`
297+
else
298+
parallel_number=8
299+
fi
300+
if [ "$1" != "" ]; then
297301
parallel_number=$1
298302
fi
299303
make clean
300304
make -j ${parallel_number}
301-
make install -j `nproc`
305+
make install -j ${parallel_number}
302306
}
303307

304308

0 commit comments

Comments
 (0)