Primiano Tucci | 1d40998 | 2019-09-19 10:15:18 +0100 | [diff] [blame] | 1 | build_config_dir_ = "include/perfetto/base/build_configs/bazel" |
| 2 | |
| 3 | # Deliberately NOT a perfetto_cc_library, to avoid cyclic deps. |
| 4 | # This is pulled as a default dep by all targets. |
| 5 | cc_library( |
| 6 | name = "build_config_hdr", |
| 7 | hdrs = [build_config_dir_ + "/perfetto_build_flags.h"], |
| 8 | includes = [build_config_dir_], |
Lalit Maganti | 279ecde | 2019-04-01 16:57:12 +0100 | [diff] [blame] | 9 | ) |
Lalit Maganti | 26f69bd | 2019-04-29 18:23:47 +0100 | [diff] [blame] | 10 | |
Primiano Tucci | 1d40998 | 2019-09-19 10:15:18 +0100 | [diff] [blame] | 11 | perfetto_cc_library( |
| 12 | name = "cc_merged_sql_metrics", |
| 13 | hdrs = ["src/trace_processor/metrics/sql_metrics.h"], |
| 14 | ) |
| 15 | |
| 16 | perfetto_py_binary( |
Lalit Maganti | caac992 | 2019-05-01 10:40:53 +0100 | [diff] [blame] | 17 | name = "gen_merged_sql_metrics_py", |
Lalit Maganti | 26f69bd | 2019-04-29 18:23:47 +0100 | [diff] [blame] | 18 | srcs = [ |
Lalit Maganti | ab619fa | 2019-05-02 12:56:37 +0100 | [diff] [blame] | 19 | "tools/gen_merged_sql_metrics.py", |
| 20 | ], |
| 21 | main = "tools/gen_merged_sql_metrics.py", |
Lalit Maganti | c449f77 | 2020-06-03 14:20:10 +0100 | [diff] [blame] | 22 | python_version = "PY3", |
Lalit Maganti | 26f69bd | 2019-04-29 18:23:47 +0100 | [diff] [blame] | 23 | ) |
Lalit Maganti | 6560034 | 2019-09-19 21:35:35 +0100 | [diff] [blame] | 24 | |
Lalit Maganti | 117272f | 2020-09-11 14:01:18 +0100 | [diff] [blame] | 25 | perfetto_py_binary( |
| 26 | name = "gen_cc_proto_descriptor_py", |
| 27 | srcs = [ |
| 28 | "tools/gen_cc_proto_descriptor.py", |
| 29 | ], |
| 30 | main = "tools/gen_cc_proto_descriptor.py", |
| 31 | python_version = "PY3", |
| 32 | ) |
| 33 | |
Lalit Maganti | 6560034 | 2019-09-19 21:35:35 +0100 | [diff] [blame] | 34 | perfetto_java_proto_library( |
| 35 | name = "protos_perfetto_metrics_java", |
| 36 | deps = [ |
| 37 | ":protos_perfetto_metrics_protos", |
| 38 | ], |
| 39 | ) |
| 40 | |
| 41 | perfetto_java_proto_library( |
| 42 | name = "protos_perfetto_metrics_android_java", |
| 43 | deps = [ |
| 44 | ":protos_perfetto_metrics_android_protos", |
| 45 | ], |
| 46 | ) |
| 47 | |
Lalit Maganti | c3187f8 | 2019-09-20 14:51:11 +0100 | [diff] [blame] | 48 | perfetto_java_proto_library( |
| 49 | name = "protos_perfetto_trace_merged_trace_java", |
| 50 | deps = [ |
| 51 | ":protos_perfetto_trace_merged_trace_protos", |
| 52 | ], |
| 53 | ) |
| 54 | |
Hector Dearman | b0f680e | 2020-04-28 17:40:37 +0100 | [diff] [blame] | 55 | perfetto_java_proto_library( |
Hector Dearman | 41fb181 | 2020-04-29 11:28:09 +0100 | [diff] [blame] | 56 | name = "protos_perfetto_config_merged_config_java", |
Hector Dearman | b0f680e | 2020-04-28 17:40:37 +0100 | [diff] [blame] | 57 | deps = [ |
Hector Dearman | 41fb181 | 2020-04-29 11:28:09 +0100 | [diff] [blame] | 58 | ":protos_perfetto_config_merged_config_protos", |
Hector Dearman | b0f680e | 2020-04-28 17:40:37 +0100 | [diff] [blame] | 59 | ], |
| 60 | ) |
| 61 | |
Lalit Maganti | 46e2bda | 2020-05-06 12:51:33 +0100 | [diff] [blame] | 62 | perfetto_java_lite_proto_library( |
| 63 | name = "protos_perfetto_config_merged_config_java_lite", |
| 64 | deps = [ |
| 65 | ":protos_perfetto_config_merged_config_protos", |
| 66 | ], |
| 67 | ) |
| 68 | |
Lalit Maganti | 6560034 | 2019-09-19 21:35:35 +0100 | [diff] [blame] | 69 | perfetto_gensignature_internal_only( |
| 70 | name = "trace_processor_sig", |
| 71 | srcs = [ |
| 72 | ":trace_processor_shell", |
| 73 | ":trace_to_text", |
| 74 | ], |
| 75 | tags = [ |
| 76 | "__TRACE_PROCESSOR_SIG_TAG1", |
| 77 | "__TRACE_PROCESSOR_SIG_TAG2", |
| 78 | ], |
| 79 | ) |
Anindita Ghosh | 237a776 | 2020-06-30 10:46:52 +0000 | [diff] [blame] | 80 | |
Anindita Ghosh | 152562f | 2020-07-08 20:29:56 +0000 | [diff] [blame] | 81 | # Noop targets used to represent targets of the protobuf library. |
| 82 | # These will be rewritten in Google3 to be dependencies on the real targets. |
| 83 | |
| 84 | perfetto_py_library( |
Anindita Ghosh | 37c9e1e | 2020-07-09 17:07:26 +0000 | [diff] [blame] | 85 | name = "pyglib_noop", |
| 86 | srcs = [], |
| 87 | ) |
| 88 | |
| 89 | perfetto_py_library( |
Anindita Ghosh | 152562f | 2020-07-08 20:29:56 +0000 | [diff] [blame] | 90 | name = "protobuf_noop", |
| 91 | srcs = [], |
| 92 | ) |
| 93 | |
| 94 | perfetto_py_library( |
| 95 | name = "protobuf_descriptor_pb2_noop", |
| 96 | srcs = [], |
| 97 | ) |
| 98 | |
Anindita Ghosh | f52572f | 2020-08-03 21:15:45 +0000 | [diff] [blame] | 99 | perfetto_py_library( |
| 100 | name = "trace_processor_init_noop", |
| 101 | srcs = [], |
| 102 | ) |
| 103 | |
Anindita Ghosh | 237a776 | 2020-06-30 10:46:52 +0000 | [diff] [blame] | 104 | perfetto_py_binary( |
Lalit Maganti | 82a2c04 | 2020-07-06 13:50:33 +0100 | [diff] [blame] | 105 | name = "trace_processor_py_example", |
| 106 | srcs = ["src/trace_processor/python/example.py"], |
| 107 | deps = [":trace_processor_py"], |
| 108 | main = "src/trace_processor/python/example.py", |
Anindita Ghosh | 237a776 | 2020-06-30 10:46:52 +0000 | [diff] [blame] | 109 | python_version = "PY3", |
| 110 | ) |
| 111 | |
| 112 | perfetto_py_library( |
Lalit Maganti | 82a2c04 | 2020-07-06 13:50:33 +0100 | [diff] [blame] | 113 | name = "trace_processor_py", |
Anindita Ghosh | 456261f | 2020-09-07 11:31:24 +0100 | [diff] [blame] | 114 | srcs = glob(["src/trace_processor/python/perfetto/trace_processor/*.py"]), |
Anindita Ghosh | 152562f | 2020-07-08 20:29:56 +0000 | [diff] [blame] | 115 | data = [ |
Anindita Ghosh | f52572f | 2020-08-03 21:15:45 +0000 | [diff] [blame] | 116 | ":trace_processor_init_noop", |
Anindita Ghosh | 456261f | 2020-09-07 11:31:24 +0100 | [diff] [blame] | 117 | "src/trace_processor/python/perfetto/trace_processor/trace_processor.descriptor", |
| 118 | "src/trace_processor/python/perfetto/trace_processor/metrics.descriptor", |
Anindita Ghosh | 7887c76 | 2020-07-20 16:35:15 +0000 | [diff] [blame] | 119 | ":trace_processor_shell", |
Anindita Ghosh | 152562f | 2020-07-08 20:29:56 +0000 | [diff] [blame] | 120 | ], |
| 121 | deps = [ |
| 122 | ":protobuf_noop", |
| 123 | ":protobuf_descriptor_pb2_noop", |
Anindita Ghosh | 37c9e1e | 2020-07-09 17:07:26 +0000 | [diff] [blame] | 124 | ":pyglib_noop", |
Anindita Ghosh | 152562f | 2020-07-08 20:29:56 +0000 | [diff] [blame] | 125 | ] |
Anindita Ghosh | 237a776 | 2020-06-30 10:46:52 +0000 | [diff] [blame] | 126 | ) |