diff --git a/Allwmake-scan b/Allwmake-scan new file mode 100755 index 0000000000..eeb7c274ad --- /dev/null +++ b/Allwmake-scan @@ -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 "$@" + +#------------------------------------------------------------------------------ diff --git a/wmake/rules/linux64Clang/c++Scan b/wmake/rules/linux64Clang/c++Scan new file mode 100644 index 0000000000..bb63f5a322 --- /dev/null +++ b/wmake/rules/linux64Clang/c++Scan @@ -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 diff --git a/wmake/rules/linux64Clang/cScan b/wmake/rules/linux64Clang/cScan new file mode 100644 index 0000000000..d5c4a6bd55 --- /dev/null +++ b/wmake/rules/linux64Clang/cScan @@ -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