Jumbo support for ppapi (-7.5 CPU minutes)

Jumbo is a unity build system for Chromium (see
https://chromium.googlesource.com/chromium/src/+/lkgr/docs/jumbo.md )
which merges cc files at the build target level.

The code in //ppapi needs roughly 15 CPU minutes to compile in my
measurements, which is 2.3% of the total jumbo build time and one of
the largest remaining non-thirdparty code blocks without jumbo support.

This saves about 7.5 CPU minutes in a jumbo build, which is
a bit over 1% of the total reference build time. It doesn't cover
thunk which is most of the remaining compile time. There are
too much generated code with reused symbol names in thunk for it
to be trivially supported right now.

Bug: 898475
Change-Id: I1ee592578ac765cbd58cb856fcd5f331d3dd8c50
Reviewed-on: https://chromium-review.googlesource.com/c/1297366
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#609687}
diff --git a/ppapi/cpp/BUILD.gn b/ppapi/cpp/BUILD.gn
index a83cd49..da877e90 100644
--- a/ppapi/cpp/BUILD.gn
+++ b/ppapi/cpp/BUILD.gn
@@ -2,6 +2,8 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import("//build/config/jumbo.gni")
+
 if (is_nacl) {
   import("//build/config/nacl/config.gni")
 }
@@ -9,7 +11,7 @@
 if (is_nacl && is_nacl_glibc) {
   cpp_target_type = "shared_library"
 } else {
-  cpp_target_type = "static_library"
+  cpp_target_type = "jumbo_static_library"
 }
 
 # Link to this target to get the PPAPI C++ wrapper objects and plugin startup
@@ -50,7 +52,7 @@
 # Link to this target to get only the PPAPI C++ wrapper objects but not the
 # plugin startup code. Some plugins need special startup code that they supply
 # themselves.
-source_set("objects") {
+jumbo_source_set("objects") {
   sources = [
     "array_output.cc",
     "array_output.h",
diff --git a/ppapi/host/BUILD.gn b/ppapi/host/BUILD.gn
index 32d3328..56b4526 100644
--- a/ppapi/host/BUILD.gn
+++ b/ppapi/host/BUILD.gn
@@ -2,7 +2,9 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-component("host") {
+import("//build/config/jumbo.gni")
+
+jumbo_component("host") {
   output_name = "ppapi_host"
 
   sources = [
diff --git a/ppapi/proxy/BUILD.gn b/ppapi/proxy/BUILD.gn
index 075e81e..49f3837 100644
--- a/ppapi/proxy/BUILD.gn
+++ b/ppapi/proxy/BUILD.gn
@@ -2,13 +2,14 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import("//build/config/jumbo.gni")
 import("//build/config/nacl/config.gni")
 
 config("proxy_implementation") {
   defines = [ "PPAPI_PROXY_IMPLEMENTATION" ]
 }
 
-component("proxy") {
+jumbo_component("proxy") {
   output_name = "ppapi_proxy"
 
   sources = [
@@ -365,7 +366,7 @@
   }
 }
 
-static_library("test_support") {
+jumbo_static_library("test_support") {
   testonly = true
 
   sources = [
diff --git a/ppapi/shared_impl/BUILD.gn b/ppapi/shared_impl/BUILD.gn
index c60f43a..edddfc8 100644
--- a/ppapi/shared_impl/BUILD.gn
+++ b/ppapi/shared_impl/BUILD.gn
@@ -2,9 +2,10 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import("//build/config/jumbo.gni")
 import("//build/config/nacl/config.gni")
 
-component("shared_impl") {
+jumbo_component("shared_impl") {
   output_name = "ppapi_shared"
 
   sources = [