How to make scan-build (clang) work together with pre-installed android gcc?

I am trying to do a static analysis of the source code for my own Android project written in C / C ++ using scan-build. I tried the instructors on this page (http://clang.llvm.org/get_started.html#build) to create and run scan-build. All this is done in version Ubuntu 10.10, 64 bit.

Since I build my project in the android source, the compilers used are gcc and g ++ located in android / prebuilt / linux-x86 / toolchain / arm-eabi-4.4.0 / bin /.

They say that I can configure scan-build to work with gcc / g ++ using the -use-C ++ and -use-cc options. But when I run the command: (./run_scanbuild.sh is the build script)

scan-build --use-cc=/home/chulwoo/8655_GB_AU_2_30/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc --use-c++=/home/chulwoo/8655_GB_AU_2_30/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-g++ ./run_scanbuild.sh

He says:

scan-build: 'clang' executable not found in '/home/chulwoo/Clang/llvm/tools/clang/tools/scan-build/bin'.
scan-build: Using 'clang' from path: /home/chulwoo/Clang/build/Debug+Asserts/bin//clang

It seems that the -use-C ++ and -use-cc options are simply ignored.

- , gcc/g++ Android? , Clang in android?

. Jin.

+3
1

, .

, , . , gcc .

scan-build gcc ...whatever you wanna give as options...

- - , , .

0

All Articles