* commit 'eb9388bcee5372b3c935f92d59bc396500a5e6a7': Enhance hello-jni to report APP_ABI at compilation
This commit is contained in:
1
ndk/samples/hello-jni/jni/Application.mk
Normal file
1
ndk/samples/hello-jni/jni/Application.mk
Normal file
@@ -0,0 +1 @@
|
|||||||
|
APP_ABI := all
|
||||||
@@ -27,5 +27,23 @@ jstring
|
|||||||
Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
|
Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
|
||||||
jobject thiz )
|
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 ".");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user