Add ccc-analyzer/cxx-analyzer

Wrappers invoked by build system "WITH_STATIC_ANALYZER=1 m/mm/mmm/mma/mmma ..."
in the following format:

    ccc-analyzer ARCH LOCAL_CC ...

Under WITH_SYNTAX_CHECK=1, m/mm/mmm/mma/mmma wrap "make" with
"tools/scan-build/scan-build" which utillizes "clang --analyze"
for static code analyses.  Script scan-build interposes on compiler
with CC/CXX ignored by the Android build system unfortunately.
Instead, Android build system recognizes WITH_SYNTAX_CHECK and
replace LOCAL_CC/LOCAL_CXX with our own ccc-syntax/cxx-syntax,
which in turn setup the following env. vars expected by

Also fix tools/scan-build
1. ccc-analyzer to sandwich args passed to clang with
   CLANG_CFLAGS and CLANG_CFLAGS_END, otherwise clang may not
   succeed with right --target and headers in prebuilts/gcc
2. scan-build to accept "--top=Android_top_dir" soley to display
   full path of scan-view to open report should analyzer fail.

Change-Id: I4ec40d5174fc9af380d20898eb1d0c7b8a14ce11
6 files changed
tree: 443bcaf50d1fdafd6cb6bd49a00623ec9aa0de5f
  1. bin/
  2. lib/
  3. tools/