mirror of https://github.com/vitalif/phantomjs
Use hw.ncpu sysctl on FreeBSD to determine processor count.
Patch by Mike Meyer. http://code.google.com/p/phantomjs/issues/detail?id=5971.9
parent
52e67c5aa7
commit
c3c17a5364
11
build.sh
11
build.sh
|
@ -19,17 +19,20 @@ elif [[ $OSTYPE = darwin* ]]; then
|
|||
# We only support modern Mac machines, they are at least using
|
||||
# hyperthreaded dual-core CPU.
|
||||
COMPILE_JOBS=4
|
||||
elif [[ $OSTYPE == freebsd* ]]; then
|
||||
COMPILE_JOBS=`sysctl -n hw.ncpu`
|
||||
else
|
||||
CPU_CORES=`grep -c ^processor /proc/cpuinfo`
|
||||
if [[ "$CPU_CORES" -gt 1 ]]; then
|
||||
COMPILE_JOBS=$CPU_CORES
|
||||
if [[ "$COMPILE_JOBS" -gt 8 ]]; then
|
||||
# Safety net.
|
||||
COMPILE_JOBS=8
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$COMPILE_JOBS" -gt 8 ]]; then
|
||||
# Safety net.
|
||||
COMPILE_JOBS=8
|
||||
fi
|
||||
|
||||
until [ -z "$1" ]; do
|
||||
case $1 in
|
||||
"--qt-config")
|
||||
|
|
Loading…
Reference in New Issue