Age | Commit message (Collapse) | Author |
|
|
|
Change-Id: Iedee650ab8d55d31fc6886157d4d14c20658adf6
|
|
|
|
respectively (darwin-x86)"
|
|
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: I36059c84f3f28c8ec9828f3d5febfcedc5b4d452
|
|
respectively (darwin-x86)
Change-Id: I005a6601e88650c6af917179de807cba851d8f3d
|
|
|
|
|
|
Add clang enough for build system to call with "WITH_SYNTAX_CHECK=1 make ..." to
utilize clang's better diagnostics
Build instructions (on MacOSX 10.6):
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/darwin-x86_64/bin/clang* bin
cp -a $NDK/toolchains/llvm-3.3/prebuilt/darwin-x86_64/lib/clang/3.3/include lib/clang/3.3
Change-Id: I65f56308413ce0649e4b1f7e55bbf45399227b18
|
|
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: I21a402bd50ec694d5b5fa496a2d5d66a5fc5a515
|
|
|