Open shizhx opened 8 years ago
I tried to edit the compile_commands.json
and remove some compile options, content become:
[
{
"command": "cc -c -fpic -I/home/hsz/labs/test/cmake_android/hello-jni/jni -DANDROID -I/home/hsz/App/android-ndk-r10e/platforms/android-3/arch-arm/usr/include -o /home/hsz/labs/test/cmake_android/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o /home/hsz/labs/test/cmake_android/hello-jni/jni/hello-jni.c",
"directory": "/home/hsz/labs/test/cmake_android/hello-jni/jni",
"file": "/home/hsz/labs/test/cmake_android/hello-jni/jni/hello-jni.c"
}
]
and that error disappeared……
The problem seems to be the -march=armv5te
which is not supported by clang, and then it bails out.
I don't really know how to fix this problem. I can't simply filter out the -march because it might impact some ifdef for supported arch.
@shizhx Any news?
Android NDK project: https://github.com/googlesamples/android-ndk/tree/66d64b4710291f289c05c52abdb0e2650af0f6f2/hello-jni execute
bear ndk-build
to generatecompile_commands.json
, here is it's content:then I execute these commands:
and get this error:
what can I do to resolve this error?