buildbot-checker.sh: Just require scan-build to be in the $PATH.
This commit is contained in:
parent
e3231d1cb0
commit
101ec3c831
|
@ -5,23 +5,10 @@
|
||||||
# back to the buildmaster. You might find it useful too.
|
# back to the buildmaster. You might find it useful too.
|
||||||
|
|
||||||
# Install Clang (you already have it on Mac OS X, apt-get install clang
|
# Install Clang (you already have it on Mac OS X, apt-get install clang
|
||||||
# on Ubuntu, etc),
|
# on Ubuntu, etc), Make sure "scan-build" is in your $PATH.
|
||||||
# or download checker at http://clang-analyzer.llvm.org/ and unpack it in
|
|
||||||
# /usr/local ... update CHECKERDIR as appropriate.
|
|
||||||
|
|
||||||
FINALDIR="$1"
|
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
|
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -40,13 +27,10 @@ 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"
|
# 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...
|
# You might want to do this for CMake-backed builds instead...
|
||||||
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" ..
|
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
|
rm -rf analysis
|
||||||
PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake --build . --config Debug
|
scan-build -o analysis cmake --build . --config Debug
|
||||||
|
|
||||||
if [ `ls -A analysis |wc -l` == 0 ] ; then
|
if [ `ls -A analysis |wc -l` == 0 ] ; then
|
||||||
mkdir analysis/zarro
|
mkdir analysis/zarro
|
||||||
|
|
Loading…
Reference in New Issue