Update from https://crrev.com/317530

TBR=qsr@chromium.org
BUG=461092

Review URL: https://codereview.chromium.org/952893003
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index 85ccce7..aede7dc 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -5,7 +5,7 @@
 import("//build/config/features.gni")
 import("//build/config/ui.gni")
 import("//testing/test.gni")
-if (cpu_arch == "arm") {
+if (current_cpu == "arm") {
   import("//build/config/arm.gni")
 }
 
@@ -178,7 +178,7 @@
     defines += [ "SKIA_IMPLEMENTATION=1" ]
   }
 
-  if (cpu_arch == "arm") {
+  if (current_cpu == "arm") {
     if (arm_use_neon) {
       defines += [ "SK_ARM_HAS_NEON" ]
     }
@@ -298,7 +298,10 @@
   sources += gypi_skia_utils.sources
   sources += gypi_values.skia_library_sources
 
-  if (cpu_arch == "arm") {
+  # This and skia_opts are really the same conceptual target so share headers.
+  allow_circular_includes_from = [ ":skia_opts" ]
+
+  if (current_cpu == "arm") {
     sources += [
       "//third_party/skia/src/core/SkUtilsArm.cpp",
       "//third_party/skia/src/core/SkUtilsArm.h",
@@ -532,7 +535,7 @@
   cflags = []
   defines = []
 
-  if (cpu_arch == "x86" || cpu_arch == "x64") {
+  if (current_cpu == "x86" || current_cpu == "x64") {
     sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources +
               gypi_skia_opts.sse41_sources +
               [
@@ -543,7 +546,7 @@
     if (is_linux || is_mac) {
       cflags += [ "-msse4.1" ]
     }
-  } else if (cpu_arch == "arm") {
+  } else if (current_cpu == "arm") {
     # The assembly uses the frame pointer register (r7 in Thumb/r11 in
     # ARM), the compiler doesn't like that.
     cflags += [ "-fomit-frame-pointer" ]
@@ -563,7 +566,7 @@
     } else {
       sources = gypi_skia_opts.none_sourcees
     }
-  } else if (cpu_arch == "mipsel") {
+  } else if (current_cpu == "mipsel") {
     cflags += [ "-fomit-frame-pointer" ]
     sources = gypi_skia_opts.none_sources
   } else {
@@ -611,6 +614,7 @@
     ":skia",
     "//base",
     "//base/test:run_all_unittests",
+    "//cc:test_support",  # TODO: Fix this test to not depend on cc.
     "//testing/gtest",
     "//ui/gfx",
     "//ui/gfx/geometry",