mirror of https://github.com/PCSX2/pcsx2.git
build.sh: allow to replace make by ninja to speed up the build system
Quick benchmark. GCC debug mode Full build: 6 second better, it can 2 additional cores :) make : ./build.sh --dbg --clean 213.25s user 22.35s system 881% cpu 26.739 total ninja: ./build.sh --dbg --clean 203.94s user 18.31s system 1085% cpu 20.474 total No change build:: 1 second better :) make -C build_dbg -j 16 install 1.51s user 0.34s system 206% cpu 0.898 total ninja -C build_dbg -j 16 install 0.05s user 0.02s system 98% cpu 0.074 total
This commit is contained in:
parent
029468e7b4
commit
d87452ed21
13
build.sh
13
build.sh
|
@ -33,6 +33,10 @@ build="$root/build"
|
|||
coverity_dir="cov-int"
|
||||
coverity_result=pcsx2-coverity.xz
|
||||
|
||||
if [ -x `which ninja` ]; then
|
||||
flags="$flags -GNinja"
|
||||
fi
|
||||
|
||||
if [ `uname -s` = 'Darwin' ]; then
|
||||
ncpu=`sysctl -n hw.ncpu`
|
||||
release=$(uname -r)
|
||||
|
@ -241,7 +245,12 @@ fi
|
|||
############################################################
|
||||
# Real build
|
||||
############################################################
|
||||
make -j"$ncpu" 2>&1 | tee -a "$log"
|
||||
make install 2>&1 | tee -a "$log"
|
||||
if [ -x `which ninja` ]; then
|
||||
ninja 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
|
||||
|
|
Loading…
Reference in New Issue