mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
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>
This commit is contained in:
parent
95ccc1c283
commit
6c57f6b2c2
@ -6,7 +6,7 @@ set -o pipefail
|
||||
SCRIPT_DIR="$(dirname "$BASH_SOURCE")"
|
||||
SCRIPT_DIR="$(realpath "$SCRIPT_DIR")"
|
||||
|
||||
num_vcpus=$(( $(lscpu -p | tail -1 | cut -d "," -f 1) + 1 ))
|
||||
num_vcpus=$(nproc)
|
||||
|
||||
CEPH_DIR="${CEPH_DIR:-$SCRIPT_DIR}"
|
||||
BUILD_DIR="${BUILD_DIR:-${CEPH_DIR}/build}"
|
||||
|
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user