Have jumbo dump the original sources in the gn |data| variable

Jumbo, as implemented as a gn template, will naturally hide
the original files behind new files target_jumbo_1.cc,
target_jumbo_2.cc, .... This breaks the gn analyze step which is
used by cq to figure out if it needs to test compile or not.

There might be unexpected and unwanted side effects from this.
The cleanest solution would be to give gn native jumbo support
which would also allow other changes like better IDE support
and better error messages, but this is what we got.

Bug: 893071
Change-Id: Ibbe8ccd71c932ca4c28c3157e386530d1ae00965
Reviewed-on: https://chromium-review.googlesource.com/c/1268336
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#628598}
diff --git a/build/config/jumbo.gni b/build/config/jumbo.gni
index 7834edf9..572762b 100644
--- a/build/config/jumbo.gni
+++ b/build/config/jumbo.gni
@@ -217,6 +217,17 @@
         include_dirs = invoker.include_dirs
       }
       include_dirs += [ root_build_dir ]
+
+      # For the "gn analyze" step to work, gn needs to know about the
+      # original source files. They can't be in |sources| because then
+      # they will be compiled, so they have to be somewhere else where
+      # gn analyze looks. Let's go with the |data| variable.
+      variables_to_not_forward += [ "data" ]
+      data = []
+      if (defined(invoker.data)) {
+        data += invoker.data
+      }
+      data += invoker_sources - excluded_sources
     }
     forward_variables_from(invoker, "*", variables_to_not_forward)
   }