diff options
author | Mike Latimer <mlatimer@suse.com> | 2020-03-27 03:14:52 +0100 |
---|---|---|
committer | Lucian Petrut <lpetrut@cloudbasesolutions.com> | 2020-12-09 19:01:02 +0100 |
commit | 6c57f6b2c2b0297e2b394e8c66666b301eb4d6cd (patch) | |
tree | 7b467a27f80af41b7fa67ae46d9c1de6c3529010 /win32_deps_build.sh | |
parent | test: Include compat.h to find uid_t/gid_t/gidlist when cross compiling (diff) | |
download | ceph-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-x | win32_deps_build.sh | 2 |
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}" |