Don't require libclcore_neon.bc on AArch64.

Change-Id: Ieb4eea41f74917c201a07aa8b246816430fcac5c
diff --git a/Android.mk b/Android.mk
index 28e8f8b..0610838 100644
--- a/Android.mk
+++ b/Android.mk
@@ -80,8 +80,6 @@
   LOCAL_REQUIRED_MODULES_arm += libclcore_neon.bc
 endif
 
-LOCAL_REQUIRED_MODULES_arm64 += libclcore_neon.bc
-
 # Generate build information (Build time + Build git revision + Build Semi SHA1)
 my_2nd_arch_prefix :=
 include $(LIBBCC_ROOT_PATH)/libbcc-gen-build-info.mk
diff --git a/lib/Renderscript/RSInfo.cpp b/lib/Renderscript/RSInfo.cpp
index 5bca5e6..5937fe4 100644
--- a/lib/Renderscript/RSInfo.cpp
+++ b/lib/Renderscript/RSInfo.cpp
@@ -48,7 +48,7 @@
 #if defined(__i386__) || defined(__x86_64__)
 const char RSInfo::LibCLCoreX86Path[] = SYSLIBPATH"/libclcore_x86.bc";
 #endif
-#if defined(ARCH_ARM_HAVE_NEON)
+#if defined(ARCH_ARM_HAVE_NEON) && !defined(DISABLE_CLCORE_NEON)
 const char RSInfo::LibCLCoreNEONPath[] = SYSLIBPATH"/libclcore_neon.bc";
 #endif
 
@@ -57,7 +57,7 @@
 const uint8_t *RSInfo::LibRSSHA1 = NULL;
 const uint8_t *RSInfo::LibCLCoreSHA1 = NULL;
 const uint8_t *RSInfo::LibCLCoreDebugSHA1 = NULL;
-#if defined(ARCH_ARM_HAVE_NEON)
+#if defined(ARCH_ARM_HAVE_NEON) && !defined(DISABLE_CLCORE_NEON)
 const uint8_t *RSInfo::LibCLCoreNEONSHA1 = NULL;
 #endif
 
@@ -83,7 +83,7 @@
       reinterpret_cast<const uint8_t *>(::dlsym(h, "libclcore_bc_SHA1"));
   LibCLCoreDebugSHA1 =
       reinterpret_cast<const uint8_t *>(::dlsym(h, "libclcore_debug_bc_SHA1"));
-#if defined(ARCH_ARM_HAVE_NEON)
+#if defined(ARCH_ARM_HAVE_NEON) && !defined(DISABLE_CLCORE_NEON)
   LibCLCoreNEONSHA1 =
       reinterpret_cast<const uint8_t *>(::dlsym(h, "libclcore_neon_bc_SHA1"));
 #endif
@@ -114,7 +114,7 @@
                              const DependencyTableTy &pDeps) {
   // Built-in dependencies are libbcc.so, libRS.so and libclcore.bc plus
   // libclcore_neon.bc if NEON is available on the target device.
-#if !defined(ARCH_ARM_HAVE_NEON)
+#if !defined(ARCH_ARM_HAVE_NEON) && !defined(DISABLE_CLCORE_NEON)
   static const unsigned NumBuiltInDependencies = 5;
 #else
   static const unsigned NumBuiltInDependencies = 6;
@@ -139,7 +139,7 @@
         pInfo.mDependencyTable[3];
     const std::pair<const char *, const uint8_t *> &cache_libclcore_debug_dep =
         pInfo.mDependencyTable[4];
-#if defined(ARCH_ARM_HAVE_NEON)
+#if defined(ARCH_ARM_HAVE_NEON) && !defined(DISABLE_CLCORE_NEON)
     const std::pair<const char *, const uint8_t *> &cache_libclcore_neon_dep =
         pInfo.mDependencyTable[5];
 #endif
@@ -197,7 +197,7 @@
         return false;
     }
 
-#if defined(ARCH_ARM_HAVE_NEON)
+#if defined(ARCH_ARM_HAVE_NEON) && !defined(DISABLE_CLCORE_NEON)
     // Check libclcore_neon.bc if NEON is available.
     if (::memcmp(cache_libclcore_neon_dep.second, LibCLCoreNEONSHA1,
                  SHA1_DIGEST_LENGTH) != 0) {
diff --git a/libbcc-targets.mk b/libbcc-targets.mk
index 31c9ff7..35b1ee7 100644
--- a/libbcc-targets.mk
+++ b/libbcc-targets.mk
@@ -28,7 +28,7 @@
   LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON
 endif
 
-LOCAL_CFLAGS_arm64 += -DFORCE_ARM64_CODEGEN -DARCH_ARM_HAVE_NEON -DARCH_ARM_HAVE_VFP -DARCH_ARM_HAVE_VFP_D32
+LOCAL_CFLAGS_arm64 += -DFORCE_ARM64_CODEGEN -DARCH_ARM_HAVE_NEON -DARCH_ARM_HAVE_VFP -DARCH_ARM_HAVE_VFP_D32 -DDISABLE_CLCORE_NEON
 LOCAL_CFLAGS_mips += -DFORCE_MIPS_CODEGEN
 LOCAL_CFLAGS_mips64 += -DFORCE_MIPS64_CODEGEN
 
diff --git a/libbcc.sha1.mk b/libbcc.sha1.mk
index dbe615f..60c05d7 100644
--- a/libbcc.sha1.mk
+++ b/libbcc.sha1.mk
@@ -22,11 +22,6 @@
 endif
 endif
 
-ifeq ($(TARGET_$(my_2nd_arch_prefix)ARCH),arm64)
-  libbcc_SHA1_SRCS += \
-    $(call intermediates-dir-for,SHARED_LIBRARIES,libclcore_neon.bc,,,$(my_2nd_arch_prefix))/libclcore_neon.bc
-endif
-
 libbcc_GEN_SHA1_STAMP := $(LOCAL_PATH)/tools/build/gen-sha1-stamp.py
 intermediates := $(call local-intermediates-dir,,$(my_2nd_arch_prefix))