blob: 83a17f08c75c91d00f338d5c4d4f4d1f032d22d6 [file] [log] [blame]
Primiano Tucci1d409982019-09-19 10:15:18 +01001build_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.
5cc_library(
6 name = "build_config_hdr",
7 hdrs = [build_config_dir_ + "/perfetto_build_flags.h"],
8 includes = [build_config_dir_],
Lalit Maganti279ecde2019-04-01 16:57:12 +01009)
Lalit Maganti26f69bd2019-04-29 18:23:47 +010010
Primiano Tucci1d409982019-09-19 10:15:18 +010011perfetto_cc_library(
12 name = "cc_merged_sql_metrics",
13 hdrs = ["src/trace_processor/metrics/sql_metrics.h"],
14)
15
16perfetto_py_binary(
Lalit Maganticaac9922019-05-01 10:40:53 +010017 name = "gen_merged_sql_metrics_py",
Lalit Maganti26f69bd2019-04-29 18:23:47 +010018 srcs = [
Lalit Magantiab619fa2019-05-02 12:56:37 +010019 "tools/gen_merged_sql_metrics.py",
20 ],
21 main = "tools/gen_merged_sql_metrics.py",
Lalit Magantic449f772020-06-03 14:20:10 +010022 python_version = "PY3",
Lalit Maganti26f69bd2019-04-29 18:23:47 +010023)
Lalit Maganti65600342019-09-19 21:35:35 +010024
Lalit Maganti117272f2020-09-11 14:01:18 +010025perfetto_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 Maganti65600342019-09-19 21:35:35 +010034perfetto_java_proto_library(
35 name = "protos_perfetto_metrics_java",
36 deps = [
37 ":protos_perfetto_metrics_protos",
38 ],
39)
40
41perfetto_java_proto_library(
42 name = "protos_perfetto_metrics_android_java",
43 deps = [
44 ":protos_perfetto_metrics_android_protos",
45 ],
46)
47
Lalit Magantic3187f82019-09-20 14:51:11 +010048perfetto_java_proto_library(
49 name = "protos_perfetto_trace_merged_trace_java",
50 deps = [
51 ":protos_perfetto_trace_merged_trace_protos",
52 ],
53)
54
Hector Dearmanb0f680e2020-04-28 17:40:37 +010055perfetto_java_proto_library(
Hector Dearman41fb1812020-04-29 11:28:09 +010056 name = "protos_perfetto_config_merged_config_java",
Hector Dearmanb0f680e2020-04-28 17:40:37 +010057 deps = [
Hector Dearman41fb1812020-04-29 11:28:09 +010058 ":protos_perfetto_config_merged_config_protos",
Hector Dearmanb0f680e2020-04-28 17:40:37 +010059 ],
60)
61
Lalit Maganti46e2bda2020-05-06 12:51:33 +010062perfetto_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 Maganti65600342019-09-19 21:35:35 +010069perfetto_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 Ghosh237a7762020-06-30 10:46:52 +000080
Anindita Ghosh152562f2020-07-08 20:29:56 +000081# 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
84perfetto_py_library(
Anindita Ghosh37c9e1e2020-07-09 17:07:26 +000085 name = "pyglib_noop",
86 srcs = [],
87)
88
89perfetto_py_library(
Anindita Ghosh152562f2020-07-08 20:29:56 +000090 name = "protobuf_noop",
91 srcs = [],
92)
93
94perfetto_py_library(
95 name = "protobuf_descriptor_pb2_noop",
96 srcs = [],
97)
98
Anindita Ghoshf52572f2020-08-03 21:15:45 +000099perfetto_py_library(
100 name = "trace_processor_init_noop",
101 srcs = [],
102)
103
Anindita Ghosh237a7762020-06-30 10:46:52 +0000104perfetto_py_binary(
Lalit Maganti82a2c042020-07-06 13:50:33 +0100105 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 Ghosh237a7762020-06-30 10:46:52 +0000109 python_version = "PY3",
110)
111
112perfetto_py_library(
Lalit Maganti82a2c042020-07-06 13:50:33 +0100113 name = "trace_processor_py",
Anindita Ghosh456261f2020-09-07 11:31:24 +0100114 srcs = glob(["src/trace_processor/python/perfetto/trace_processor/*.py"]),
Anindita Ghosh152562f2020-07-08 20:29:56 +0000115 data = [
Anindita Ghoshf52572f2020-08-03 21:15:45 +0000116 ":trace_processor_init_noop",
Anindita Ghosh456261f2020-09-07 11:31:24 +0100117 "src/trace_processor/python/perfetto/trace_processor/trace_processor.descriptor",
118 "src/trace_processor/python/perfetto/trace_processor/metrics.descriptor",
Anindita Ghosh7887c762020-07-20 16:35:15 +0000119 ":trace_processor_shell",
Anindita Ghosh152562f2020-07-08 20:29:56 +0000120 ],
121 deps = [
122 ":protobuf_noop",
123 ":protobuf_descriptor_pb2_noop",
Anindita Ghosh37c9e1e2020-07-09 17:07:26 +0000124 ":pyglib_noop",
Anindita Ghosh152562f2020-07-08 20:29:56 +0000125 ]
Anindita Ghosh237a7762020-06-30 10:46:52 +0000126)