Make checker-buildbot.sh work just about anywhere Clang is installed.
authorRyan C. Gordon
Wed, 19 Mar 2014 15:25:27 -0400
changeset 863921093d07b958
parent 8638 d7a5c452411b
child 8640 89bab8249c74
Make checker-buildbot.sh work just about anywhere Clang is installed.
build-scripts/checker-buildbot.sh
     1.1 --- a/build-scripts/checker-buildbot.sh	Wed Mar 19 13:22:09 2014 -0400
     1.2 +++ b/build-scripts/checker-buildbot.sh	Wed Mar 19 15:25:27 2014 -0400
     1.3 @@ -10,12 +10,16 @@
     1.4  
     1.5  # this currently expects a mercurial working copy that it can modify a little.
     1.6  
     1.7 -CHECKERDIR="/usr/local/checker-276"
     1.8 -
     1.9  FINALDIR="$1"
    1.10  
    1.11 +CHECKERDIR="/usr/local/checker-276"
    1.12  if [ ! -d "$CHECKERDIR" ]; then
    1.13 -    echo "$CHECKERDIR not found." 1>&2
    1.14 +    echo "$CHECKERDIR not found. Trying /usr/share/clang ..." 1>&2
    1.15 +    CHECKERDIR="/usr/share/clang/scan-build"
    1.16 +fi
    1.17 +
    1.18 +if [ ! -d "$CHECKERDIR" ]; then
    1.19 +    echo "$CHECKERDIR not found. Giving up." 1>&2
    1.20      exit 1
    1.21  fi
    1.22  
    1.23 @@ -61,7 +65,9 @@
    1.24  mkdir checker-buildbot
    1.25  cd checker-buildbot
    1.26  #cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER="$CHECKERDIR/libexec/ccc-analyzer" -DSDL_STATIC=OFF ..
    1.27 -CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0" ../configure
    1.28 +#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0" ../configure
    1.29 +CFLAGS="-O0" PATH="$CHECKERDIR:$PATH" scan-build -o analysis ../configure
    1.30 +rm -rf analysis
    1.31  PATH="$CHECKERDIR:$PATH" scan-build -o analysis $MAKE
    1.32  mv analysis/* ../analysis
    1.33  rmdir analysis   # Make sure this is empty.