Have static analysis script use Ninja.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 12 May 2020 15:49:53 -0400
changeset 1684 eb8b181d8301
parent 1683 89e8d39420cd
child 1685 12063a77c51d
Have static analysis script use Ninja.
extras/buildbot-checker.sh
--- a/extras/buildbot-checker.sh	Tue May 12 15:19:01 2020 -0400
+++ b/extras/buildbot-checker.sh	Tue May 12 15:49:53 2020 -0400
@@ -22,32 +22,6 @@
     exit 1
 fi
 
-if [ -z "$MAKE" ]; then
-    OSTYPE=`uname -s`
-    if [ "$OSTYPE" == "Linux" ]; then
-        NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
-        let NCPU=$NCPU+1
-    elif [ "$OSTYPE" = "Darwin" ]; then
-        NCPU=`sysctl -n hw.ncpu`
-    elif [ "$OSTYPE" = "SunOS" ]; then
-        NCPU=`/usr/sbin/psrinfo |wc -l |sed -e 's/^ *//g;s/ *$//g'`
-    else
-        NCPU=1
-    fi
-
-    if [ -z "$NCPU" ]; then
-        NCPU=1
-    elif [ "$NCPU" = "0" ]; then
-        NCPU=1
-    fi
-
-    MAKE="make -j$NCPU"
-fi
-
-echo "\$MAKE is '$MAKE'"
-MAKECMD="$MAKE"
-unset MAKE  # prevent warnings about jobserver mode.
-
 set -x
 set -e
 
@@ -66,13 +40,13 @@
 # The -Wno-liblto is new since our checker-279 upgrade, I think; checker otherwise warns "libLTO.dylib relative to clang installed dir not found"
 
 # You might want to do this for CMake-backed builds instead...
-PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake -Wno-dev -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_EXE_LINKER_FLAGS="-Wno-liblto" ..
+PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake -G Ninja -Wno-dev -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_EXE_LINKER_FLAGS="-Wno-liblto" ..
 
 # ...or run configure without the scan-build wrapper...
 #CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0 -Wno-deprecated-declarations" LDFLAGS="-Wno-liblto" ../configure --enable-assertions=enabled
 
 rm -rf analysis
-PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis $MAKECMD
+PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake --build . --config Debug
 
 if [ `ls -A analysis |wc -l` == 0 ] ; then
     mkdir analysis/zarro