Merge "Use new clang scan-build script."
This commit is contained in:
15
envsetup.sh
15
envsetup.sh
@@ -644,11 +644,18 @@ function getdriver()
|
|||||||
local T="$1"
|
local T="$1"
|
||||||
test "$WITH_STATIC_ANALYZER" = "0" && unset WITH_STATIC_ANALYZER
|
test "$WITH_STATIC_ANALYZER" = "0" && unset WITH_STATIC_ANALYZER
|
||||||
if [ -n "$WITH_STATIC_ANALYZER" ]; then
|
if [ -n "$WITH_STATIC_ANALYZER" ]; then
|
||||||
|
# Use scan-build to collect all static analyzer reports into directory
|
||||||
|
# /tmp/scan-build-yyyy-mm-dd-hhmmss-*
|
||||||
|
# The clang compiler passed by --use-analyzer here is not important.
|
||||||
|
# build/core/binary.mk will set CLANG_CXX and CLANG before calling
|
||||||
|
# c++-analyzer and ccc-analyzer.
|
||||||
|
local CLANG_VERSION=$(get_build_var LLVM_PREBUILTS_VERSION)
|
||||||
|
local BUILD_OS=$(get_build_var BUILD_OS)
|
||||||
|
local CLANG_DIR="$T/prebuilts/clang/host/${BUILD_OS}-x86/${CLANG_VERSION}"
|
||||||
echo "\
|
echo "\
|
||||||
$T/prebuilts/misc/linux-x86/analyzer/tools/scan-build/scan-build \
|
${CLANG_DIR}/tools/scan-build/bin/scan-build \
|
||||||
--use-analyzer $T/prebuilts/misc/linux-x86/analyzer/bin/analyzer \
|
--use-analyzer ${CLANG_DIR}/bin/clang \
|
||||||
--status-bugs \
|
--status-bugs"
|
||||||
--top=$T"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user