我想将覆盖率用于静态分析,而我需要它用于 C++。由于我的项目使用 Android NDK,我将编译器配置为:
cov-configure –comptype gcc –compiler ~/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc-4.6
然后我跑了cov-build –dir coverity ndk-build –j8 NDK_DEBUG=1
一切都在建立,但我有一个警告
*[*WARNING] No files were emitted. This may be due to a problem with your configuration
or because no files were actually compiled by your build command.
Please make sure you have configured the compilers actually used in the compilation.**
所以我忽略了警告并跑了
cov-analyze –dir coverity –all
**Coverity Static Analysis for C/C++ version 6.6.1 on Linux 2.6.38-8-server x86_64
Internal version numbers: d614fc01a4 p-eureka-push-15003.308
Looking for translation units
Error: no matching translation units.**
那么我的编译器配置正确吗?之前有没有人为 Android NDK 配置过编译器?