ENH: add 'Scan' WM_COMPILE_OPTION (clang only)

- backend settings for scan-build
This commit is contained in:
Mark Olesen
2019-01-02 11:49:49 +01:00
parent 4ecdb2512d
commit 7bf25dbda1
3 changed files with 26 additions and 0 deletions

12
Allwmake-scan Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# Allwmake with scan-build (clang)
c_compiler="$(command -v $WM_CC)"
cxx_compiler"$(command -v $WM_CXX)"
set -x
scan-build --use-cc="$c_compiler" --use-c++="$cxx_compiler" \
./Allwmake "$@"
#------------------------------------------------------------------------------

View File

@ -0,0 +1,7 @@
# Static analyzer with clang and Opt.
# Call top-level Allwmake with 'scan-build' and corresponding compiler
include $(DEFAULT_RULES)/c++Opt
cxx_compiler := $(shell which clang++)
CC := $(shell echo "$(cxx_compiler)" | sed -e 's@/bin/[^/]*@/libexec/c++-analyzer@') -std=c++11 -m64

View File

@ -0,0 +1,7 @@
# Static analyzer with clang and Opt.
# Call top-level Allwmake with 'scan-build' and corresponding compiler
include $(DEFAULT_RULES)/cOpt
c_compiler := $(shell which clang)
cc := $(shell echo "$(c_compiler)" | sed -e 's@/bin/[^/]*@/libexec/ccc-analyzer@') -m64