Include more Skia files in GN checks

Includes more Skia source files within the scope of "gn check", which
only considers headers reachable from the GN build graph. This avoids
later roll issues when Chromium has stricter checks than PDFium.

This change introduces a new top-level "gn_check" target that is only
used for GN reachability, and is not built by default.

Change-Id: I9057509461ba5b256610c21048458e7fc685e615
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/101050
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: K. Moon <kmoon@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 3c49e84..689ea87 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -572,3 +572,16 @@
     ]
   }
 }
+
+# Makes additional targets reachable only for "gn check". These are not always
+# built by the "all" Ninja target, which uses the "default" group, which in turn
+# depends on the "pdfium_all" group.
+group("gn_check") {
+  deps = []
+
+  # TODO(crbug.com/pdfium/1832): Remove !is_android when //third_party/expat is
+  # available.
+  if (!is_android) {
+    deps += [ "//skia" ]
+  }
+}
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index bbcc765..93e2061 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -170,6 +170,7 @@
   ]
 
   # The skia sources values are relative to the skia_dir, so we need to rebase.
+  sources += skia_core_public
   sources += skia_sksl_gpu_sources
   sources += skia_sksl_sources
   sources += skia_utils_sources
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 9cf2147..9fc2dd5 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -204,7 +204,7 @@
   }
 }
 
-if (pdf_use_skia || pdf_use_skia_paths) {
+if (is_linux || is_chromeos) {
   config("system_fontconfig") {
     libs = [ "fontconfig" ]
   }