aboutsummaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2017-06-01 10:49:57 -0700
committerDan Albert <danalbert@google.com>2017-06-01 10:52:29 -0700
commit1ce4103519fd0d04c1ebd70a0e90c829d99dcc74 (patch)
tree4f4b6624e68f31287e75da248da8a860c7d83838 /sources
parente4e5f6dfcac71a3d87f943ce01bfc6f39789ccd5 (diff)
downloadndk-1ce4103519fd0d04c1ebd70a0e90c829d99dcc74.tar.gz
Use -u for native_app_glue.
This way people don't have to change makefiles that have worked until now (though they wouldn't anyway if they're still using `app_dummy`). Test: ./run_tests.py --rebuild --filter native_app_glue Bug: https://github.com/android-ndk/ndk/issues/381 Change-Id: Id6c09cc83e462b9914c810fe79d924f1fc28e1d4
Diffstat (limited to 'sources')
-rw-r--r--sources/android/native_app_glue/Android.mk3
-rw-r--r--sources/android/native_app_glue/android_native_app_glue.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/sources/android/native_app_glue/Android.mk b/sources/android/native_app_glue/Android.mk
index a0a7d211e..e18a14eaf 100644
--- a/sources/android/native_app_glue/Android.mk
+++ b/sources/android/native_app_glue/Android.mk
@@ -6,5 +6,8 @@ LOCAL_MODULE:= android_native_app_glue
LOCAL_SRC_FILES:= android_native_app_glue.c
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_LDLIBS := -llog -landroid
+# The linker will strip this as "unused" since this is a static library, but we
+# need to keep it around since it's the interface for JNI.
+LOCAL_EXPORT_LDFLAGS := -u ANativeActivity_onCreate
include $(BUILD_STATIC_LIBRARY)
diff --git a/sources/android/native_app_glue/android_native_app_glue.h b/sources/android/native_app_glue/android_native_app_glue.h
index 9cbb06bc9..c99d6e12a 100644
--- a/sources/android/native_app_glue/android_native_app_glue.h
+++ b/sources/android/native_app_glue/android_native_app_glue.h
@@ -337,9 +337,7 @@ void android_app_post_exec_cmd(struct android_app* android_app, int8_t cmd);
* does this for us.
*/
__attribute__((
- deprecated("Calls to app_dummy are no longer necessary. Use "
- "`LOCAL_WHOLE_STATIC_LIBRARIES := android_native_app_glue` and "
- "remove the call. See "
+ deprecated("Calls to app_dummy are no longer necessary. See "
"https://github.com/android-ndk/ndk/issues/381."))) void
app_dummy();