Some minor changes needed in order to build LLVM as part of LLDB build using Android NDK. A new define ANDROID_NDK is used in order to differentiate from LLVM standalone build vs LLVM as part of LLDB build.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Why are you using the __ANDROID_NDK__ define? I think we should use __ANDROID__ instead. If it's not defined in out build, we should define it (instead of __ANDROID_NDK__)
I've checked Android NDK versions 3, 9, and 21 and all of them automatically have these symbols defined when building with Android.mk
__ANDROID__ ANDROID vharron@tifa:~/dev/defines$ cat jni/main.c #include <stdio.h> int main() { #ifdef __ANDROID__ printf("__ANDROID__\n"); #endif #ifdef ANDROID printf("ANDROID\n"); #endif #ifdef __ANDROID_NDK__ printf("__ANDROID_NDK__\n"); #endif }
vharron@tifa:~/dev/defines$ strings libs/armeabi/libhello-android-9.so | egrep ANDROID __ANDROID__ ANDROID vharron@tifa:~/dev/defines$ vi jni/Application.mk vharron@tifa:~/dev/defines$ ~/Downloads/android-ndk-r10c/ndk-build [armeabi] Compile thumb : hello-android-21 <= main.c [armeabi] SharedLibrary : libhello-android-21.so [armeabi] Install : libhello-android-21.so => libs/armeabi/libhello-android-21.so vharron@tifa:~/dev/defines$ strings libs/armeabi/libhello-android-21.so | egrep ANDROID __ANDROID__ ANDROID
Comment Actions
I don't fully understand what is the goal of this CL, but I think most of it don't make too much help to us now, so I will abandon it.