Build rules for Renderscript compatibility library.

Bug: 7419958
Change-Id: I2e0f0bb632e6ff22b2cf1a1b96b28364637995cc
diff --git a/core/package.mk b/core/package.mk
index 3af1afb..c0bc7d8 100644
--- a/core/package.mk
+++ b/core/package.mk
@@ -191,6 +191,8 @@
 endif # EMMA_INSTRUMENT_STATIC
 endif # LOCAL_EMMA_INSTRUMENT
 
+rs_compatibility_jni_libs :=
+
 #################################
 include $(BUILD_SYSTEM)/java.mk
 #################################
@@ -324,6 +326,12 @@
       $(addsuffix $(so_suffix), \
         $(LOCAL_JNI_SHARED_LIBRARIES)))
 
+# Include RS dynamically-generated libraries as well
+# Keep this ifneq, as the += otherwise adds spaces that need to be stripped.
+ifneq ($(rs_compatibility_jni_libs),)
+jni_shared_libraries += $(rs_compatibility_jni_libs)
+endif
+
 # App explicitly requires the prebuilt NDK libstlport_shared.so.
 # libstlport_shared.so should never go to the system image.
 # Instead it should be packaged into the apk.