sonicdebris/asan-android-test

CMakeList failed

badousuan opened this issue · 2 comments

"file(GLOB_RECURSE ASAN_SRC ${ANDROID_TOOLCHAIN_ROOT}/.asan${ARCH}*-android.so)"
can not find out libclang_rt.asan-${ARCH}-android.so on Mac.
I have to copy libclang_rt.asan-${ARCH}-android.so to jniLibs manually.......

the problem is ANDROID_TOOLCHAIN_ROOT is pointing to ~/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64
and the lib is not there.
in my setup the lib is in : ~/Library/Android/sdk/ndk-bundle/toolchains/llvm/...
so I changed it to :
file(GLOB_RECURSE ASAN_SRC ~/Library/Android/sdk/ndk-bundle/toolchains/llvm/.asan${ARCH}*-android.so)

@sonicdebris I also have another much more important question please: when I use the sanitize scheme, it works and detect me the crash that I can see in logcat, but the debugger is not stopping in breakpoints.
I have added debuggable true and jniDebuggable true in sanitize variant, but it is neither stopping in Kotlin code nor in native code. what shall we do to have the debugger working? I have simulator nexus api 27 x86. thanks