1build_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_], 9) 10 11perfetto_cc_library( 12 name = "cc_merged_sql_metrics", 13 hdrs = ["src/trace_processor/metrics/sql_metrics.h"], 14) 15 16perfetto_py_binary( 17 name = "gen_merged_sql_metrics_py", 18 srcs = [ 19 "tools/gen_merged_sql_metrics.py", 20 ], 21 main = "tools/gen_merged_sql_metrics.py", 22 python_version = "PY3", 23) 24 25perfetto_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 34perfetto_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 48perfetto_java_proto_library( 49 name = "protos_perfetto_trace_merged_trace_java", 50 deps = [ 51 ":protos_perfetto_trace_merged_trace_protos", 52 ], 53) 54 55perfetto_java_proto_library( 56 name = "protos_perfetto_config_merged_config_java", 57 deps = [ 58 ":protos_perfetto_config_merged_config_protos", 59 ], 60) 61 62perfetto_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 69perfetto_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) 80 81# This is overridden in google internal builds via 82# PERFETTO_CONFIG.deps.version_header (see perfetto_cfg.bzl). 83perfetto_cc_library( 84 name = "cc_perfetto_version_header", 85 hdrs = ["perfetto_version.gen.h"], 86) 87 88perfetto_py_binary( 89 name = "gen_version_header_py", 90 srcs = ["tools/write_version_header.py"], 91 data = ["CHANGELOG"], 92 main = "tools/write_version_header.py", 93 python_version = "PY3", 94) 95 96# Noop targets used to represent targets of the protobuf library. 97# These will be rewritten in Google3 to be dependencies on the real targets. 98 99perfetto_py_library( 100 name = "pyglib_noop", 101 srcs = [], 102) 103 104perfetto_py_library( 105 name = "protobuf_noop", 106 srcs = [], 107) 108 109perfetto_py_library( 110 name = "protobuf_descriptor_pb2_noop", 111 srcs = [], 112) 113 114perfetto_py_library( 115 name = "gfile_noop", 116 srcs = [], 117) 118 119perfetto_py_library( 120 name = "trace_processor_init_noop", 121 srcs = [], 122) 123 124perfetto_py_binary( 125 name = "trace_processor_py_example", 126 srcs = ["src/trace_processor/python/example.py"], 127 deps = [":trace_processor_py"], 128 main = "src/trace_processor/python/example.py", 129 python_version = "PY3", 130) 131 132perfetto_py_library( 133 name = "trace_processor_py", 134 srcs = glob(["src/trace_processor/python/perfetto/trace_processor/*.py"]), 135 data = [ 136 ":trace_processor_init_noop", 137 "src/trace_processor/python/perfetto/trace_processor/trace_processor.descriptor", 138 "src/trace_processor/python/perfetto/trace_processor/metrics.descriptor", 139 ":trace_processor_shell", 140 ], 141 deps = [ 142 ":gfile_noop", 143 ":protobuf_noop", 144 ":protobuf_descriptor_pb2_noop", 145 ":pyglib_noop", 146 ], 147 visibility = PERFETTO_CONFIG.public_visibility, 148) 149