Enhance hello-jni to report APP_ABI at compilation

Change-Id: I24989212cfb729705cc4177a7112804fa68144c4
This commit is contained in:
Andrew Hsieh
2013-11-21 16:19:10 +08:00
parent 18e10d81e3
commit 833979268e
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1 @@
APP_ABI := all

View File

@@ -27,5 +27,23 @@ jstring
Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
jobject thiz )
{
return (*env)->NewStringUTF(env, "Hello from JNI !");
#if defined(__arm__)
#if defined(__ARM_ARCH_7A__)
#if defined(__ARM_NEON__)
#define ABI "armeabi-v7a/NEON"
#else
#define ABI "armeabi-v7a"
#endif
#else
#define ABI "armeabi"
#endif
#elif defined(__i386__)
#define ABI "x86"
#elif defined(__mips__)
#define ABI "mips"
#else
#define ABI "unknown"
#endif
return (*env)->NewStringUTF(env, "Hello from JNI ! Compiled with ABI " ABI ".");
}