mirror of https://github.com/PCSX2/pcsx2.git
build.sh: also use ninja for coverity build
This commit is contained in:
parent
145d6e29c2
commit
cac822f785
22
build.sh
22
build.sh
|
@ -33,10 +33,6 @@ build="$root/build"
|
||||||
coverity_dir="cov-int"
|
coverity_dir="cov-int"
|
||||||
coverity_result=pcsx2-coverity.xz
|
coverity_result=pcsx2-coverity.xz
|
||||||
|
|
||||||
if command -v ninja >/dev/null ; then
|
|
||||||
flags="$flags -GNinja"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$(uname -s)" = 'Darwin' ]; then
|
if [ "$(uname -s)" = 'Darwin' ]; then
|
||||||
ncpu="$(sysctl -n hw.ncpu)"
|
ncpu="$(sysctl -n hw.ncpu)"
|
||||||
|
|
||||||
|
@ -53,6 +49,13 @@ else
|
||||||
toolfile=cmake/linux-compiler-i386-multilib.cmake
|
toolfile=cmake/linux-compiler-i386-multilib.cmake
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if command -v ninja >/dev/null ; then
|
||||||
|
flags="$flags -GNinja"
|
||||||
|
make=ninja
|
||||||
|
else
|
||||||
|
make="make --jobs=$ncpu"
|
||||||
|
fi
|
||||||
|
|
||||||
for ARG in "$@"; do
|
for ARG in "$@"; do
|
||||||
case "$ARG" in
|
case "$ARG" in
|
||||||
--clean ) cleanBuild=1 ;;
|
--clean ) cleanBuild=1 ;;
|
||||||
|
@ -239,7 +242,7 @@ fi
|
||||||
# Coverity build
|
# Coverity build
|
||||||
############################################################
|
############################################################
|
||||||
if [ "$CoverityBuild" -eq 1 ] && command -v cov-build >/dev/null ; then
|
if [ "$CoverityBuild" -eq 1 ] && command -v cov-build >/dev/null ; then
|
||||||
cov-build --dir "$coverity_dir" make -j"$ncpu" 2>&1 | tee -a "$log"
|
cov-build --dir "$coverity_dir" $make 2>&1 | tee -a "$log"
|
||||||
# Warning: $coverity_dir must be the root directory
|
# Warning: $coverity_dir must be the root directory
|
||||||
(cd "$build"; tar caf $coverity_result "$coverity_dir")
|
(cd "$build"; tar caf $coverity_result "$coverity_dir")
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -248,12 +251,7 @@ fi
|
||||||
############################################################
|
############################################################
|
||||||
# Real build
|
# Real build
|
||||||
############################################################
|
############################################################
|
||||||
if command -v ninja >/dev/null ; then
|
$make 2>&1 | tee -a "$log"
|
||||||
ninja 2>&1 | tee -a "$log"
|
$make install 2>&1 | tee -a "$log"
|
||||||
ninja install 2>&1 | tee -a "$log"
|
|
||||||
else
|
|
||||||
make -j"$ncpu" 2>&1 | tee -a "$log"
|
|
||||||
make install 2>&1 | tee -a "$log"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue