Merge "Add librsrt_x86_64.bc and modify the script to update x86_64 prebuilts." into nyc-dev
diff --git a/driver/runtime/Android.mk b/driver/runtime/Android.mk
index 8db4394..49bc321 100755
--- a/driver/runtime/Android.mk
+++ b/driver/runtime/Android.mk
@@ -215,3 +215,14 @@
 LOCAL_CFLAGS += $(clcore_cflags)
 LOCAL_SRC_FILES := $(clcore_files) $(clcore_files_64)
 include $(LOCAL_PATH)/build_bc_lib.mk
+
+# Build the x86_64 version of the library
+include $(CLEAR_VARS)
+
+BCC_RS_TRIPLE := aarch64-linux-android
+RS_TRIPLE_CFLAGS := -D__x86_64__
+LOCAL_MODULE := librsrt_x86_64.bc
+LOCAL_IS_HOST_MODULE := true
+LOCAL_CFLAGS += $(clcore_cflags) -DARCH_X86_HAVE_SSSE3
+LOCAL_SRC_FILES := $(clcore_x86_files) $(clcore_base_files_64)
+include $(LOCAL_PATH)/build_bc_lib.mk
diff --git a/update_rs_prebuilts.sh b/update_rs_prebuilts.sh
index 11b1009..2224d73 100755
--- a/update_rs_prebuilts.sh
+++ b/update_rs_prebuilts.sh
@@ -21,8 +21,8 @@
   SHORT_OSNAME=linux
   SONAME=so
   # Target architectures and their system library names.
-  TARGETS=(arm mips x86 arm64)
-  SYS_NAMES=(generic generic_mips generic_x86 generic_arm64)
+  TARGETS=(arm mips x86 arm64 x86_64)
+  SYS_NAMES=(generic generic_mips generic_x86 generic_arm64 generic_x86_64)
   NUM_CORES=`cat /proc/cpuinfo | grep processor | tail -n 1 | cut -f 2 -d :`
   NUM_CORES=$(($NUM_CORES+1))