build-scripts/checker-buildbot.sh
changeset 10652 c3fbfa229d71
parent 10649 ddd8049e9d39
child 11170 b5fe34e8401f
equal deleted inserted replaced
10651:f0065b8e6541 10652:c3fbfa229d71
    44     MAKE="make -j$NCPU"
    44     MAKE="make -j$NCPU"
    45 fi
    45 fi
    46 
    46 
    47 echo "\$MAKE is '$MAKE'"
    47 echo "\$MAKE is '$MAKE'"
    48 
    48 
       
    49 # Unset $MAKE so submakes don't use it.
       
    50 MAKECOMMAND="$MAKE"
       
    51 unset MAKE
       
    52 
    49 set -x
    53 set -x
    50 set -e
    54 set -e
    51 
    55 
    52 cd `dirname "$0"`
    56 cd `dirname "$0"`
    53 cd ..
    57 cd ..
    58 fi
    62 fi
    59 
    63 
    60 mkdir checker-buildbot
    64 mkdir checker-buildbot
    61 cd checker-buildbot
    65 cd checker-buildbot
    62 
    66 
       
    67 # We turn off deprecated declarations, because we don't care about these warnings during static analysis.
       
    68 # The -Wno-liblto is new since our checker-279 upgrade, I think; checker otherwise warns "libLTO.dylib relative to clang installed dir not found"
       
    69 
    63 # You might want to do this for CMake-backed builds instead...
    70 # You might want to do this for CMake-backed builds instead...
    64 PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled ..
    71 PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake -Wno-dev -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
    65 
    72 
    66 # ...or run configure without the scan-build wrapper...
    73 # ...or run configure without the scan-build wrapper...
    67 #CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0" ../configure --enable-assertions=enabled
    74 #CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0 -Wno-deprecated-declarations" LDFLAGS="-Wno-liblto" ../configure --enable-assertions=enabled
    68 
       
    69 # ...but this works for our buildbots just fine (EXCEPT ON LATEST MAC OS X).
       
    70 #CFLAGS="-O0" PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis ../configure --enable-assertions=enabled
       
    71 
    75 
    72 rm -rf analysis
    76 rm -rf analysis
    73 PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis $MAKE
    77 PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis $MAKECOMMAND
    74 
    78 
    75 if [ `ls -A analysis |wc -l` == 0 ] ; then
    79 if [ `ls -A analysis |wc -l` == 0 ] ; then
    76     mkdir analysis/zarro
    80     mkdir analysis/zarro
    77     echo '<html><head><title>Zarro boogs</title></head><body>Static analysis: no issues to report.</body></html>' >analysis/zarro/index.html
    81     echo '<html><head><title>Zarro boogs</title></head><body>Static analysis: no issues to report.</body></html>' >analysis/zarro/index.html
    78 fi
    82 fi