summaryrefslogtreecommitdiffstats
path: root/win32_deps_build.sh
diff options
context:
space:
mode:
authorMike Latimer <mlatimer@suse.com>2020-03-27 03:14:52 +0100
committerLucian Petrut <lpetrut@cloudbasesolutions.com>2020-12-09 19:01:02 +0100
commit6c57f6b2c2b0297e2b394e8c66666b301eb4d6cd (patch)
tree7b467a27f80af41b7fa67ae46d9c1de6c3529010 /win32_deps_build.sh
parenttest: Include compat.h to find uid_t/gid_t/gidlist when cross compiling (diff)
downloadceph-6c57f6b2c2b0297e2b394e8c66666b301eb4d6cd.tar.xz
ceph-6c57f6b2c2b0297e2b394e8c66666b301eb4d6cd.zip
win32*.sh: Use nproc for CPU count when targeting win32
When building in chroot jail, /proc/cpuinfo may not be available. Switch to nproc which should be widely available, and does not rely on /proc/cpuinfo. Signed-off-by: Mike Latimer <mlatimer@suse.com>
Diffstat (limited to 'win32_deps_build.sh')
-rwxr-xr-xwin32_deps_build.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32_deps_build.sh b/win32_deps_build.sh
index 44c1f55cb88..81c02d2e5ef 100755
--- a/win32_deps_build.sh
+++ b/win32_deps_build.sh
@@ -5,7 +5,7 @@ set -e
SCRIPT_DIR="$(dirname "$BASH_SOURCE")"
SCRIPT_DIR="$(realpath "$SCRIPT_DIR")"
-num_vcpus=$(( $(lscpu -p | tail -1 | cut -d "," -f 1) + 1 ))
+num_vcpus=$(nproc)
NUM_WORKERS=${NUM_WORKERS:-$num_vcpus}
DEPS_DIR="${DEPS_DIR:-$SCRIPT_DIR/build.deps}"