summaryrefslogtreecommitdiff
path: root/build-scripts
diff options
context:
space:
mode:
authorRyan C. Gordon <icculus@icculus.org>2020-05-18 15:52:51 -0400
committerRyan C. Gordon <icculus@icculus.org>2020-05-18 15:52:51 -0400
commit53e9e5018e5003b6b0d801a1ac49deae6d6666cb (patch)
treecd6c0fcc06d9f382d56953290c42c25b0cc5361f /build-scripts
parentf79034d8338e83d9859fe2965097f53897846a8a (diff)
downloadsdl-53e9e5018e5003b6b0d801a1ac49deae6d6666cb.tar.gz
checker-buildbot.sh: Use Ninja, not GNU make, and expect scan-build in $PATH.
Diffstat (limited to 'build-scripts')
-rwxr-xr-xbuild-scripts/checker-buildbot.sh47
1 files changed, 3 insertions, 44 deletions
diff --git a/build-scripts/checker-buildbot.sh b/build-scripts/checker-buildbot.sh
index cc16a50a2..e8f2f2246 100755
--- a/build-scripts/checker-buildbot.sh
+++ b/build-scripts/checker-buildbot.sh
@@ -5,51 +5,10 @@
# back to the buildmaster. You might find it useful too.
# Install Clang (you already have it on Mac OS X, apt-get install clang
-# on Ubuntu, etc),
-# or download checker at http://clang-analyzer.llvm.org/ and unpack it in
-# /usr/local ... update CHECKERDIR as appropriate.
+# on Ubuntu, etc), and make sure scan-build is in your $PATH.
FINALDIR="$1"
-CHECKERDIR="/usr/local/checker-279"
-if [ ! -d "$CHECKERDIR" ]; then
- echo "$CHECKERDIR not found. Trying /usr/share/clang ..." 1>&2
- CHECKERDIR="/usr/share/clang/scan-build"
-fi
-
-if [ ! -d "$CHECKERDIR" ]; then
- echo "$CHECKERDIR not found. Giving up." 1>&2
- 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'"
-
-# Unset $MAKE so submakes don't use it.
-MAKECOMMAND="$MAKE"
-unset MAKE
-
set -x
set -e
@@ -68,13 +27,13 @@ cd checker-buildbot
# 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 -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
+scan-build -o analysis cmake -G Ninja -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_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 $MAKECOMMAND
+scan-build -o analysis ninja
if [ `ls -A analysis |wc -l` == 0 ] ; then
mkdir analysis/zarro