From 392a10515d094732790cbbc87c5d463ff42aeac8 Mon Sep 17 00:00:00 2001 From: Zhigao Tong Date: Wed, 16 Mar 2022 15:58:41 +0800 Subject: [PATCH] Update build-tiflash-release.sh --- release-centos7-llvm/scripts/build-tiflash-release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release-centos7-llvm/scripts/build-tiflash-release.sh b/release-centos7-llvm/scripts/build-tiflash-release.sh index c424d465742..d3eda1dff4e 100755 --- a/release-centos7-llvm/scripts/build-tiflash-release.sh +++ b/release-centos7-llvm/scripts/build-tiflash-release.sh @@ -35,6 +35,7 @@ set -ueox pipefail SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" SRCPATH=$(cd ${SCRIPTPATH}/../..; pwd -P) +NPROC=${NPROC:-$(nproc || grep -c ^processor /proc/cpuinfo)} INSTALL_DIR="${SRCPATH}/release-centos7-llvm/tiflash" rm -rf ${INSTALL_DIR} && mkdir -p ${INSTALL_DIR} @@ -51,7 +52,7 @@ cmake "${SRCPATH}" ${DEFINE_CMAKE_PREFIX_PATH} \ -DRUN_HAVE_STD_REGEX=0 \ -GNinja -cmake --build . --target tiflash --parallel +cmake --build . --target tiflash --parallel ${NPROC} cmake --install . --component=tiflash-release --prefix="${INSTALL_DIR}" # unset LD_LIBRARY_PATH before test