xref: /aosp_15_r20/external/perfetto/src/protozero/protoc_plugin/BUILD.gn (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1# Copyright (C) 2017 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("../../../gn/perfetto_host_executable.gni")
16
17# The plugin that generates zero-copy serializers and deserializers. Those are
18# the xxx.pbzero.h headers used all over the codebase.
19perfetto_host_executable("protozero_plugin") {
20  sources = [ "protozero_plugin.cc" ]
21  deps = [
22    "../../../gn:default_deps",
23    "../../../gn:protoc_lib",
24    "../../../src/base",
25  ]
26}
27
28# The plugin that generates standalone C++ objects from protos (xxx.gen.h).
29# This is used for core classes traced needs to know about such as
30# DataSourceDescriptor.
31perfetto_host_executable("cppgen_plugin") {
32  sources = [ "cppgen_plugin.cc" ]
33  deps = [
34    "../../../gn:default_deps",
35    "../../../gn:protoc_lib",
36    "../../../src/base",
37  ]
38}
39
40# The plugin that generates standalone C macros and function from protos
41# (xxx.pzc.h). This is used to generate the API headers of the shared library.
42perfetto_host_executable("protozero_c_plugin") {
43  sources = [ "protozero_c_plugin.cc" ]
44  deps = [
45    "../../../gn:default_deps",
46    "../../../gn:protoc_lib",
47    "../../../src/base",
48  ]
49}
50