update our build system to support the experimental L-Release NDK

This includes adding 64-bit support for arm, x86, and mips.

R=borenet@google.com

Review URL: https://codereview.chromium.org/377993002
diff --git a/gyp/gpu.gyp b/gyp/gpu.gyp
index 6fbd05a..c1da4f1 100644
--- a/gyp/gpu.gyp
+++ b/gyp/gpu.gyp
@@ -215,6 +215,9 @@
             '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
             '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
           ],
+          'defines': [
+            'GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE=1',
+          ],
           'link_settings': {
             'libraries': [
               '-lGLESv2',
diff --git a/platform_tools/android/bin/android_setup.sh b/platform_tools/android/bin/android_setup.sh
index 4a7326b..4209050 100755
--- a/platform_tools/android/bin/android_setup.sh
+++ b/platform_tools/android/bin/android_setup.sh
@@ -116,6 +116,10 @@
       DEFINES="${DEFINES} skia_resource_cache_mb_limit=32"
       ANDROID_ARCH="x86"
       ;;
+    x86_64 | x64)
+      DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=64"
+      ANDROID_ARCH="x86_64"
+      ;;
     arm_v7)
       DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 arm_thumb=0"
       ANDROID_ARCH="arm"
@@ -132,11 +136,19 @@
       DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=1"
       ANDROID_ARCH="arm"
       ;;
+    arm64)
+      DEFINES="${DEFINES} skia_arch_type=arm64 skia_arch_width=64"
+      ANDROID_ARCH="arm64"
+      ;;
     mips)
       DEFINES="${DEFINES} skia_arch_type=mips skia_arch_width=32"
       DEFINES="${DEFINES} skia_resource_cache_mb_limit=32"
       ANDROID_ARCH="mips"
       ;;
+    mips64)
+      DEFINES="${DEFINES} skia_arch_type=mips skia_arch_width=64"
+      ANDROID_ARCH="mips64"
+      ;;
     *)
       if [ -z "$ANDROID_IGNORE_UNKNOWN_DEVICE" ]; then
           echo "ERROR: unknown device $TARGET_DEVICE"
diff --git a/platform_tools/android/bin/utils/setup_toolchain.sh b/platform_tools/android/bin/utils/setup_toolchain.sh
index 1e90616..4476bb8 100755
--- a/platform_tools/android/bin/utils/setup_toolchain.sh
+++ b/platform_tools/android/bin/utils/setup_toolchain.sh
@@ -27,9 +27,14 @@
 fi
 
 function default_toolchain() {
-  API_LEVEL=14
-  NDK_REV=${NDK_REV-8e}
+  NDK_REV=${NDK_REV-10exp}
   ANDROID_ARCH=${ANDROID_ARCH-arm}
+  
+  if [[ $ANDROID_ARCH == *64* ]]; then
+    API_LEVEL=L # Experimental Android L-Release system images
+  else
+    API_LEVEL=14 # Official Android 4.0 system images  
+  fi
 
   TOOLCHAIN_DIR=${SCRIPT_DIR}/../toolchains
   if [ $(uname) == "Darwin" ]; then
diff --git a/platform_tools/android/gyp/skia_android.gypi b/platform_tools/android/gyp/skia_android.gypi
index 624b599..210a61a 100644
--- a/platform_tools/android/gyp/skia_android.gypi
+++ b/platform_tools/android/gyp/skia_android.gypi
@@ -9,16 +9,26 @@
       ],
       'variables': {
         'conditions': [
-          [ 'skia_arch_type == "x86"', {
+          [ 'skia_arch_type == "arm" and arm_version != 7', {
+            'android_arch%': "armeabi",
+          }],
+          [ 'skia_arch_type == "arm" and arm_version == 7', {
+            'android_arch%': "armeabi-v7a",
+          }],
+          [ 'skia_arch_type == "arm64"', {
+            'android_arch%': "arm64-v8a",
+          }],
+          [ 'skia_arch_type == "x86" and skia_arch_width == 32', {
             'android_arch%': "x86",
-          }, {
-            'conditions': [
-              [ 'arm_version == 7', {
-                'android_arch%': "armeabi-v7a",
-              }, {
-               'android_arch%': "armeabi",
-              }],
-            ],
+          }],
+          [ 'skia_arch_type == "x86" and skia_arch_width == 64', {
+            'android_arch%': "x86_64",
+          }],
+          [ 'skia_arch_type == "mips" and skia_arch_width == 32', {
+            'android_arch%': "mips",
+          }],
+          [ 'skia_arch_type == "mips" and skia_arch_width == 64', {
+            'android_arch%': "mips64",
           }],
         ],
       },