Use __ANDROID_NATIVE_BRIDGE__ define instead of target:arm_on_x86

Currently target:arm_on_x86 is defined both for native_bridge targets
and for non-native_bridge targets.

But we already have a way to detect native_bridge.

Also fixed 64-bit paths.

Bug: http://b/153609531

Test: cts-tradefed run cts --abi armeabi-v7a -m CtsRsCppTestCases
Test: cts-tradefed run cts --abi arm64-v8a -m CtsRsCppTestCases

Change-Id: I2f0770fe8d406b5a9b8a491a7d87202d2a674d24
diff --git a/cpu_ref/rsCpuScript.h b/cpu_ref/rsCpuScript.h
index e9feb1c..9ba65c7 100644
--- a/cpu_ref/rsCpuScript.h
+++ b/cpu_ref/rsCpuScript.h
@@ -155,20 +155,34 @@
 
 } // namespace renderscript
 
+#ifndef __ANDROID_NATIVE_BRIDGE__
+
 #ifdef __LP64__
 #define SYSLIBPATH "/system/lib64"
 #define SYSLIBPATH_BC "/system/lib64"
 #define SYSLIBPATH_VENDOR "/system/vendor/lib64"
-#elif defined(BUILD_ARM_FOR_X86) && defined(__arm__)
-#define SYSLIBPATH "/system/lib/arm"
-#define SYSLIBPATH_BC "/system/lib"
-#define SYSLIBPATH_VENDOR "/system/vendor/lib/arm"
 #else
 #define SYSLIBPATH "/system/lib"
 #define SYSLIBPATH_BC "/system/lib"
 #define SYSLIBPATH_VENDOR "/system/vendor/lib"
 #endif
 
+#else
+
+#if defined(__arm__)
+#define SYSLIBPATH "/system/lib/arm"
+#define SYSLIBPATH_BC "/system/lib"
+#define SYSLIBPATH_VENDOR "/system/vendor/lib/arm"
+#elif defined(__aarch64__)
+#define SYSLIBPATH "/system/lib64/arm64"
+#define SYSLIBPATH_BC "/system/lib64"
+#define SYSLIBPATH_VENDOR "/system/vendor/lib64/arm64"
+#else
+#error Unknown architecture
+#endif
+
+#endif
+
 } // namespace android
 
 namespace {