Add a prebuilt libgvr_shim static library for the Cr libc++ ABI version

This is necessary since there's now 3 different ABIs for libc++: ndk1, 1, and
Cr.  The ndk1 and 1 ABIs already had prebuilts, but the Cr ABI was introduced to
fix an issue with Android component builds.  All three are necessary right now,
but the ndk1 prebuilt can be removed once use_custom_libcxx=true is set on all
Android builds.

Internal CL that updates docs:
https://chrome-internal-review.googlesource.com/c/clank/internal/apps/+/767848

BUG=767901
R=bajones
CC=​thakis

Change-Id: Ib8d361152a5efb169a42c370fa4e6a80025b7af5
Reviewed-on: https://chromium-review.googlesource.com/c/1395186
Reviewed-by: Nico Weber <[email protected]>
Commit-Queue: Thomas Anderson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#620027}
diff --git a/DEPS b/DEPS
index 2ceab379..e9dd3f9 100644
--- a/DEPS
+++ b/DEPS
@@ -2543,7 +2543,7 @@
     ],
   },
   {
-    'name': 'gvr_static_shim_android_arm',
+    'name': 'gvr_static_shim_android_arm_1',
     'pattern': '\\.sha1',
     'condition': 'checkout_android',
     'action': [ 'python',
@@ -2551,11 +2551,11 @@
                 '--no_resume',
                 '--no_auth',
                 '--bucket', 'chromium-gvr-static-shim',
-                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm.a.sha1',
+                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm_1.a.sha1',
     ],
   },
   {
-    'name': 'gvr_static_shim_android_arm64',
+    'name': 'gvr_static_shim_android_arm_ndk1',
     'pattern': '\\.sha1',
     'condition': 'checkout_android',
     'action': [ 'python',
@@ -2563,23 +2563,11 @@
                 '--no_resume',
                 '--no_auth',
                 '--bucket', 'chromium-gvr-static-shim',
-                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm64.a.sha1',
-      ],
-  },
-  {
-    'name': 'gvr_static_shim_custom_libcxx_android_arm',
-    'pattern': '\\.sha1',
-    'condition': 'checkout_android',
-    'action': [ 'python',
-                'src/third_party/depot_tools/download_from_google_storage.py',
-                '--no_resume',
-                '--no_auth',
-                '--bucket', 'chromium-gvr-static-shim',
-                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm.a.sha1',
+                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm_ndk1.a.sha1',
     ],
   },
   {
-    'name': 'gvr_static_shim_custom_libcxx_android_arm64',
+    'name': 'gvr_static_shim_android_arm_Cr',
     'pattern': '\\.sha1',
     'condition': 'checkout_android',
     'action': [ 'python',
@@ -2587,8 +2575,44 @@
                 '--no_resume',
                 '--no_auth',
                 '--bucket', 'chromium-gvr-static-shim',
-                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm64.a.sha1',
-      ],
+                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm_Cr.a.sha1',
+    ],
+  },
+  {
+    'name': 'gvr_static_shim_android_arm64_1',
+    'pattern': '\\.sha1',
+    'condition': 'checkout_android',
+    'action': [ 'python',
+                'src/third_party/depot_tools/download_from_google_storage.py',
+                '--no_resume',
+                '--no_auth',
+                '--bucket', 'chromium-gvr-static-shim',
+                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm64_1.a.sha1',
+    ],
+  },
+  {
+    'name': 'gvr_static_shim_android_arm64_ndk1',
+    'pattern': '\\.sha1',
+    'condition': 'checkout_android',
+    'action': [ 'python',
+                'src/third_party/depot_tools/download_from_google_storage.py',
+                '--no_resume',
+                '--no_auth',
+                '--bucket', 'chromium-gvr-static-shim',
+                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm64_ndk1.a.sha1',
+    ],
+  },
+  {
+    'name': 'gvr_static_shim_android_arm64_Cr',
+    'pattern': '\\.sha1',
+    'condition': 'checkout_android',
+    'action': [ 'python',
+                'src/third_party/depot_tools/download_from_google_storage.py',
+                '--no_resume',
+                '--no_auth',
+                '--bucket', 'chromium-gvr-static-shim',
+                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_arm64_Cr.a.sha1',
+    ],
   },
   {
     'name': 'vr_assets',
diff --git a/third_party/.gitignore b/third_party/.gitignore
index edd94e33..3f4cc34f 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -90,10 +90,7 @@
 /gson/lib/
 /gvr-android-sdk/common_library.aar
 /gvr-android-sdk/test-libraries/controller_test_api.aar
-/gvr-android-sdk/libgvr_shim_static_arm.a
-/gvr-android-sdk/libgvr_shim_static_arm64.a
-/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm.a
-/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm64.a
+/gvr-android-sdk/libgvr_shim_static_*.a
 /gvr-android-sdk/src
 /gvr-android-sdk/test-apks/daydream_home/*.apk
 /gvr-android-sdk/test-apks/vr_services/*.apk
diff --git a/third_party/gvr-android-sdk/BUILD.gn b/third_party/gvr-android-sdk/BUILD.gn
index 1b7b72b..e1156c03 100644
--- a/third_party/gvr-android-sdk/BUILD.gn
+++ b/third_party/gvr-android-sdk/BUILD.gn
@@ -114,12 +114,14 @@
       "//clank/third_party/gvr_shim",
     ]
   } else {
-    if (use_custom_libcxx) {
-      library = "//third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_${current_cpu}.a"
+    if (!use_custom_libcxx) {
+      cxx_abi_version = "ndk1"
+    } else if (is_component_build) {
+      cxx_abi_version = "Cr"
     } else {
-      library =
-          "//third_party/gvr-android-sdk/libgvr_shim_static_${current_cpu}.a"
+      cxx_abi_version = "1"
     }
+    library = "//third_party/gvr-android-sdk/libgvr_shim_static_${current_cpu}_${cxx_abi_version}.a"
     libs += [ library ]
 
     if (is_component_build) {
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_arm.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_arm.a.sha1
deleted file mode 100644
index 0fa1089e..0000000
--- a/third_party/gvr-android-sdk/libgvr_shim_static_arm.a.sha1
+++ /dev/null
@@ -1 +0,0 @@
-b93dc26168196ca0eb2cb7d294b3c0aab0965083
\ No newline at end of file
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_arm64.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_arm64.a.sha1
deleted file mode 100644
index 16696aaf..0000000
--- a/third_party/gvr-android-sdk/libgvr_shim_static_arm64.a.sha1
+++ /dev/null
@@ -1 +0,0 @@
-e8ab02f4481e65092cf5c032e036a6fe31c92071
\ No newline at end of file
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_arm64_1.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_arm64_1.a.sha1
new file mode 100644
index 0000000..ee5e0aa
--- /dev/null
+++ b/third_party/gvr-android-sdk/libgvr_shim_static_arm64_1.a.sha1
@@ -0,0 +1 @@
+e3a8233332ab7f448613c5d3c6c78e5e698505e5
\ No newline at end of file
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_arm64_Cr.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_arm64_Cr.a.sha1
new file mode 100644
index 0000000..6ee4f74
--- /dev/null
+++ b/third_party/gvr-android-sdk/libgvr_shim_static_arm64_Cr.a.sha1
@@ -0,0 +1 @@
+dceee76743308d071abb90cf0157b3a9620badfa
\ No newline at end of file
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_arm64_ndk1.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_arm64_ndk1.a.sha1
new file mode 100644
index 0000000..d4ad04c4
--- /dev/null
+++ b/third_party/gvr-android-sdk/libgvr_shim_static_arm64_ndk1.a.sha1
@@ -0,0 +1 @@
+3dde388b26d3659b4f99d84c9a358fc78f37f5b8
\ No newline at end of file
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_arm_1.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_arm_1.a.sha1
new file mode 100644
index 0000000..58d381d
--- /dev/null
+++ b/third_party/gvr-android-sdk/libgvr_shim_static_arm_1.a.sha1
@@ -0,0 +1 @@
+8d19ef4983bbfe1b9b679f418dee80678a7d7652
\ No newline at end of file
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_arm_Cr.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_arm_Cr.a.sha1
new file mode 100644
index 0000000..0c8b7e64
--- /dev/null
+++ b/third_party/gvr-android-sdk/libgvr_shim_static_arm_Cr.a.sha1
@@ -0,0 +1 @@
+ee194b9c00e14ae07fb0e39add6522a6637b742f
\ No newline at end of file
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_arm_ndk1.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_arm_ndk1.a.sha1
new file mode 100644
index 0000000..0b49459
--- /dev/null
+++ b/third_party/gvr-android-sdk/libgvr_shim_static_arm_ndk1.a.sha1
@@ -0,0 +1 @@
+136cb96d7936fe9ad491046fd7c0ddf541ad2765
\ No newline at end of file
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm.a.sha1
deleted file mode 100644
index 39c18f4e..0000000
--- a/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm.a.sha1
+++ /dev/null
@@ -1 +0,0 @@
-e6343e9152930dcd4d9eb6eed2c993658a9e997d
\ No newline at end of file
diff --git a/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm64.a.sha1 b/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm64.a.sha1
deleted file mode 100644
index 6cd20c3f..0000000
--- a/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm64.a.sha1
+++ /dev/null
@@ -1 +0,0 @@
-9e1297a47b30e28d12113fb569f0272f43cb7607
\ No newline at end of file