tp: introduce build rules for Python C++ tables

This CL introduces the build rules to start getting Python-generated C++
tables up. Currently the headers produced are just empty but follow-up
CLs will start to fille those in.

Change-Id: I000bfca0d063cc535d723f0aed39f1a3266b00b8
diff --git a/Android.bp b/Android.bp
index 14c0e12..adef970 100644
--- a/Android.bp
+++ b/Android.bp
@@ -2183,6 +2183,7 @@
         "perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
         "perfetto_src_trace_processor_stdlib_gen_amalgamated_stdlib",
+        "perfetto_src_trace_processor_tables_tables_python",
     ],
     defaults: [
         "perfetto_defaults",
@@ -9810,6 +9811,35 @@
     ],
 }
 
+// GN: //src/trace_processor/tables:tables_python
+genrule {
+    name: "perfetto_src_trace_processor_tables_tables_python",
+    srcs: [
+        "src/trace_processor/tables/android_tables.py",
+        "src/trace_processor/tables/metadata_tables.py",
+    ],
+    tools: [
+        "perfetto_src_trace_processor_tables_tables_python_binary",
+    ],
+    cmd: "$(location perfetto_src_trace_processor_tables_tables_python_binary) --gen-dir=$(genDir) --inputs $(in) --outputs $(out)",
+    out: [
+        "src/trace_processor/tables/android_tables_py.h",
+        "src/trace_processor/tables/metadata_tables_py.h",
+    ],
+}
+
+// GN: //src/trace_processor/tables:tables_python
+python_binary_host {
+    name: "perfetto_src_trace_processor_tables_tables_python_binary",
+    srcs: [
+        "python/generators/trace_processor_table/public.py",
+        "src/trace_processor/tables/android_tables.py",
+        "src/trace_processor/tables/metadata_tables.py",
+        "tools/gen_tp_table_headers.py",
+    ],
+    main: "tools/gen_tp_table_headers.py",
+}
+
 // GN: //src/trace_processor/tables:unittests
 filegroup {
     name: "perfetto_src_trace_processor_tables_unittests",
@@ -11506,6 +11536,7 @@
         "perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
         "perfetto_src_trace_processor_stdlib_gen_amalgamated_stdlib",
+        "perfetto_src_trace_processor_tables_tables_python",
         "perfetto_src_traced_probes_ftrace_test_messages_cpp_gen_headers",
         "perfetto_src_traced_probes_ftrace_test_messages_lite_gen_headers",
         "perfetto_src_traced_probes_ftrace_test_messages_zero_gen_headers",
@@ -11998,6 +12029,7 @@
         "perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
         "perfetto_src_trace_processor_stdlib_gen_amalgamated_stdlib",
+        "perfetto_src_trace_processor_tables_tables_python",
     ],
     defaults: [
         "perfetto_defaults",
@@ -12200,6 +12232,7 @@
         "perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
         "perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
         "perfetto_src_trace_processor_stdlib_gen_amalgamated_stdlib",
+        "perfetto_src_trace_processor_tables_tables_python",
         "perfetto_src_traceconv_gen_cc_trace_descriptor",
     ],
     defaults: [