Age | Commit message (Collapse) | Author |
|
|
|
Change-Id: I331bd14826ac26b10c5cc29f88ad7df78d35c335
|
|
|
|
respectively"
|
|
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
tools/scan-build/{ccc,c++}-analyzer
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
|
|
Change-Id: Ie602e255c8dceea3adf996eedf59d4e08591e698
|
|
|
|
|
|
Add clang enough for build system to call with "WITH_SYNTAX_CHECK=1 make ..." to
utilize clang's better diagnostics
Build instructions:
export NDK=your-AOSP-path/ndk
cd $NDK ; ./build/tools/dev-cleanup.sh
./build/tools/download-toolchain-sources.sh /tmp/ndk-$USER/src
./build/tools/build-llvm.sh /tmp/ndk-$USER/src $NDK llvm-3.3
mkdir -p bin lib/clang/3.3
cp -a $NDK/toolchains/llvm-3.3/prebuilt/linux-x86_64/bin/clang* bin
cp -a $NDK/toolchains/llvm-3.3/prebuilt/linux-x86_64/lib/clang/3.3/include lib/clang/3.3
Change-Id: I835e250cf781b13162b006f17db76b3b4815b4b6
|
|
Wrappers invoked by build system "WITH_SYNTAX_CHECK=1 make ..." in the following format:
ccc-syntax ARCH LOCAL_CC ...
It calls "clang -fsyntax-only ..." to utilize clang's better diagnostics
before calling "LOCAL_CC ..." for code generation. ARCH is translated
into "-target XXX" to get proper pre-defined preprocessor symbols/macros,
etc, etc.
Change-Id: I9c657d0958533872db8aee294511ccc4a590b350
|
|
|