Lines Matching +full:scan +full:- +full:build
2 # Run clang's static analyzer (scan-build) and record its output in output-scan-build/
4 # Allow overriding binariy names, like clang-12
5 export CC=${CC:-clang}
6 SCAN_BUILD=${SCAN_BUILD:-scan-build}
9 cd "$(dirname -- "$0")" || exit $?
11 OUTPUTDIR="$(pwd)/output-scan-build"
14 set -x -e
17 if [ -z "$DESTDIR" ] ; then
18 DESTDIR="$(mktemp --tmpdir -d scan-build-destdir-XXXXXXXXXX)"
21 # Make sure to use the newly-installed libraries when running tests
24 export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('pur…
25 export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${R…
27 if [ -f /etc/debian_version ] && [ -z "${IS_CIRCLE_CI:-}" ] ; then
28 export PYTHON_SETUP_ARGS='--install-layout=deb'
31 # Build and analyze
32 make -C .. clean distclean -j"$(nproc)"
33 $SCAN_BUILD -analyze-headers -o "$OUTPUTDIR" make -C .. \
35 CFLAGS="-O2 -Wall -Wextra -D_FORTIFY_SOURCE=2 -D__CHECKER__ -I$DESTDIR/usr/include" \
36 -j"$(nproc)" \
37 install install-pywrap install-rubywrap all test
39 if [ $? -eq 0 ]; then
40 echo "++ Build succeeded"
42 echo "++ Build failed"
45 # Reduce the verbosity in order to keep the message from scan-build saying
46 # "scan-build: Run 'scan-view /.../output-scan-build/2018-...' to examine bug reports.
49 # Remove the destination directory without using "rm -rf"
51 rm -r "$DESTDIR"