blob: 53a6b3f09de252edf075fc10a2cbceb81c147959 [file] [log] [blame]
Primiano Tucciae2879e2017-09-27 11:02:09 +09001# 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
Florian Mayera2fae262018-08-31 12:10:01 -070015import("../gn/perfetto.gni")
Primiano Tucci02c11762019-08-30 00:57:59 +020016import("../gn/standalone/libc++/libc++.gni")
Florian Mayer0bea7972019-09-02 15:28:13 +010017import("../gn/standalone/sanitizers/vars.gni")
Primiano Tucci02c11762019-08-30 00:57:59 +020018
19# We should never get here in embedder builds.
20assert(perfetto_build_standalone || is_perfetto_build_generator)
Primiano Tucci0825bc82017-09-28 18:50:23 +010021
Primiano Tucci13ae72f2019-06-06 10:53:02 +010022# This is to make sure that we don't add accidental dependencies from build
23# files in src/ or include/ to buildtools. All deps (outside of /gn/*) should
24# go via the groups defined in gn/BUILD.gn, not directly into buildtools. This
25# is to allow embedders to re-route targets to their third_party directories.
26_buildtools_visibility = [
27 "./*",
28 "../gn:*",
29 "../gn/standalone:*",
30]
31
Primiano Tucci3cbb10a2018-04-10 17:52:40 +010032# Used to suppress warnings coming from googletest macros expansions.
Primiano Tucci919ca1e2019-08-21 20:26:58 +020033# These suppressions apply both to gtest/gmock haders and to perfetto's
34# test translation units. See test/gtest_and_gmock.h for the subset of
35# suppressions that apply only to the gmock/gtest headers.
Primiano Tucci3cbb10a2018-04-10 17:52:40 +010036config("test_warning_suppressions") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +010037 visibility = _buildtools_visibility
Primiano Tucci919ca1e2019-08-21 20:26:58 +020038 if (is_clang) {
39 cflags = [
40 "-Wno-unknown-warning-option",
41 "-Wno-global-constructors",
42 "-Wno-covered-switch-default",
43 "-Wno-used-but-marked-unused",
44 "-Wno-inconsistent-missing-override",
45 "-Wno-unused-member-function",
46 "-Wno-zero-as-null-pointer-constant",
47 "-Wno-weak-vtables",
Primiano Tuccif68444a2020-08-05 11:53:39 +020048 "-Wno-suggest-override",
49 "-Wno-suggest-destructor-override",
Primiano Tucci919ca1e2019-08-21 20:26:58 +020050 ]
Matthew Clarkson83987d22019-10-03 17:30:53 +010051 } else {
52 cflags = [
53 "-Wno-unknown-warning-option",
54 "-Wno-deprecated-copy",
55 ]
Primiano Tucci919ca1e2019-08-21 20:26:58 +020056 }
Primiano Tucci2a29ac72017-10-24 17:47:19 +010057}
58
Florian Mayer475bd7e2018-08-07 20:04:03 +010059config("libunwindstack_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +010060 visibility = _buildtools_visibility
Florian Mayer475bd7e2018-08-07 20:04:03 +010061 cflags = [
62 # Using -isystem instead of include_dirs (-I), so we don't need to suppress
Florian Mayerf8335662018-08-08 11:30:32 +010063 # warnings coming from libunwindstack headers. Doing so would mask warnings
64 # in our own code.
Florian Mayer475bd7e2018-08-07 20:04:03 +010065 "-isystem",
Florian Mayerf8335662018-08-08 11:30:32 +010066 rebase_path("android-core/libunwindstack/include", root_build_dir),
Florian Mayerb64d6b12018-08-30 10:46:30 -070067 "-isystem",
68 rebase_path("android-core/libprocinfo/include", root_build_dir),
69 "-isystem",
70 rebase_path("android-core/base/include", root_build_dir),
Florian Mayer6140f322019-01-21 15:10:17 +000071 "-isystem",
72 rebase_path("android-core/demangle/include", root_build_dir),
Florian Mayer475bd7e2018-08-07 20:04:03 +010073 ]
Florian Mayerb64d6b12018-08-30 10:46:30 -070074 if (is_android) {
75 cflags += [
76 "-isystem",
77 rebase_path("bionic/libc/include", root_build_dir),
78 ]
79 }
Florian Mayer12adafd2019-03-14 21:58:00 -070080 defines = [ "NO_LIBDEXFILE_SUPPORT" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +010081}
82
Primiano Tucci2a29ac72017-10-24 17:47:19 +010083# Config to include gtest.h in test targets.
Primiano Tucciae2879e2017-09-27 11:02:09 +090084config("googletest_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +010085 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +090086 defines = [ "GTEST_LANG_CXX11=1" ]
Primiano Tucci919ca1e2019-08-21 20:26:58 +020087 include_dirs = [
88 "googletest/googletest/include",
89 "googletest/googlemock/include",
Primiano Tucciae2879e2017-09-27 11:02:09 +090090 ]
Primiano Tucci3cbb10a2018-04-10 17:52:40 +010091 configs = [ ":test_warning_suppressions" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +090092}
93
94source_set("gtest") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +010095 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +090096 testonly = true
97 include_dirs = [ "googletest/googletest" ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +000098 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +090099 public_configs = [ ":googletest_config" ]
100 all_dependent_configs = [ ":googletest_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000101 sources = [ "googletest/googletest/src/gtest-all.cc" ]
102 deps = [ "//gn:default_deps" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900103}
104
105source_set("gtest_main") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100106 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +0900107 testonly = true
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000108 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900109 configs += [ ":googletest_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000110 sources = [ "googletest/googletest/src/gtest_main.cc" ]
111 deps = [ "//gn:default_deps" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900112}
113
114source_set("gmock") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100115 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +0900116 testonly = true
117 include_dirs = [ "googletest/googlemock" ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000118 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900119 public_configs = [ ":googletest_config" ]
120 all_dependent_configs = [ ":googletest_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000121 sources = [ "googletest/googlemock/src/gmock-all.cc" ]
122 deps = [ "//gn:default_deps" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900123}
124
Primiano Tuccifd484232017-10-25 00:15:39 +0100125# Configuration used to build libprotobuf_* and the protoc compiler.
126config("protobuf_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100127 visibility = _buildtools_visibility
128
Primiano Tuccifd484232017-10-25 00:15:39 +0100129 # Apply the lighter supressions and macro definitions from above.
Joel Fernandes80fc3cd2020-04-01 18:02:57 -0400130 configs = [ "//gn:protobuf_gen_config" ]
Primiano Tuccifd484232017-10-25 00:15:39 +0100131
Primiano Tuccifd484232017-10-25 00:15:39 +0100132 defines = [ "HAVE_PTHREAD=1" ]
Hector Dearmanedb3beb2017-10-09 17:53:36 +0100133 if (is_clang) {
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100134 cflags = [
135 "-Wno-unknown-warning-option",
Primiano Tuccib60d4b02017-11-10 11:03:00 +0000136 "-Wno-enum-compare-switch",
Primiano Tuccib60d4b02017-11-10 11:03:00 +0000137 "-Wno-user-defined-warnings",
Florian Mayeraa5316b2018-08-20 17:45:12 -0700138 "-Wno-tautological-constant-compare",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900139 ]
Ryan Savitskie0d8eab2019-08-15 19:04:38 +0100140 } else { # implies gcc
141 cflags = [ "-Wno-return-type" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900142 }
143}
144
145source_set("protobuf_lite") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100146 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +0900147 sources = [
Primiano Tuccif550b252019-12-03 11:06:02 +0000148 "protobuf/src/google/protobuf/any_lite.cc",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900149 "protobuf/src/google/protobuf/arena.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000150 "protobuf/src/google/protobuf/arena.h",
151 "protobuf/src/google/protobuf/arena_impl.h",
152 "protobuf/src/google/protobuf/arenastring.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900153 "protobuf/src/google/protobuf/extension_set.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000154 "protobuf/src/google/protobuf/extension_set.h",
155 "protobuf/src/google/protobuf/generated_enum_util.cc",
156 "protobuf/src/google/protobuf/generated_enum_util.h",
157 "protobuf/src/google/protobuf/generated_message_table_driven_lite.cc",
158 "protobuf/src/google/protobuf/generated_message_table_driven_lite.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900159 "protobuf/src/google/protobuf/generated_message_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000160 "protobuf/src/google/protobuf/generated_message_util.h",
161 "protobuf/src/google/protobuf/has_bits.h",
162 "protobuf/src/google/protobuf/implicit_weak_message.cc",
163 "protobuf/src/google/protobuf/implicit_weak_message.h",
164 "protobuf/src/google/protobuf/inlined_string_field.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900165 "protobuf/src/google/protobuf/io/coded_stream.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000166 "protobuf/src/google/protobuf/io/coded_stream.h",
167 "protobuf/src/google/protobuf/io/coded_stream_inl.h",
168 "protobuf/src/google/protobuf/io/io_win32.cc",
169 "protobuf/src/google/protobuf/io/io_win32.h",
170 "protobuf/src/google/protobuf/io/strtod.cc",
171 "protobuf/src/google/protobuf/io/strtod.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900172 "protobuf/src/google/protobuf/io/zero_copy_stream.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000173 "protobuf/src/google/protobuf/io/zero_copy_stream.h",
174 "protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc",
175 "protobuf/src/google/protobuf/io/zero_copy_stream_impl.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900176 "protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000177 "protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h",
178 "protobuf/src/google/protobuf/map.h",
179 "protobuf/src/google/protobuf/map_entry_lite.h",
180 "protobuf/src/google/protobuf/map_field_lite.h",
181 "protobuf/src/google/protobuf/map_type_handler.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900182 "protobuf/src/google/protobuf/message_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000183 "protobuf/src/google/protobuf/message_lite.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900184 "protobuf/src/google/protobuf/repeated_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000185 "protobuf/src/google/protobuf/repeated_field.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900186 "protobuf/src/google/protobuf/stubs/bytestream.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000187 "protobuf/src/google/protobuf/stubs/bytestream.h",
188 "protobuf/src/google/protobuf/stubs/callback.h",
189 "protobuf/src/google/protobuf/stubs/casts.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900190 "protobuf/src/google/protobuf/stubs/common.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000191 "protobuf/src/google/protobuf/stubs/common.h",
192 "protobuf/src/google/protobuf/stubs/fastmem.h",
193 "protobuf/src/google/protobuf/stubs/hash.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900194 "protobuf/src/google/protobuf/stubs/int128.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000195 "protobuf/src/google/protobuf/stubs/int128.h",
196 "protobuf/src/google/protobuf/stubs/logging.h",
197 "protobuf/src/google/protobuf/stubs/macros.h",
198 "protobuf/src/google/protobuf/stubs/map_util.h",
199 "protobuf/src/google/protobuf/stubs/mutex.h",
200 "protobuf/src/google/protobuf/stubs/once.h",
201 "protobuf/src/google/protobuf/stubs/platform_macros.h",
202 "protobuf/src/google/protobuf/stubs/port.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900203 "protobuf/src/google/protobuf/stubs/status.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000204 "protobuf/src/google/protobuf/stubs/status.h",
205 "protobuf/src/google/protobuf/stubs/status_macros.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900206 "protobuf/src/google/protobuf/stubs/statusor.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000207 "protobuf/src/google/protobuf/stubs/statusor.h",
208 "protobuf/src/google/protobuf/stubs/stl_util.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900209 "protobuf/src/google/protobuf/stubs/stringpiece.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000210 "protobuf/src/google/protobuf/stubs/stringpiece.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900211 "protobuf/src/google/protobuf/stubs/stringprintf.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000212 "protobuf/src/google/protobuf/stubs/stringprintf.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900213 "protobuf/src/google/protobuf/stubs/structurally_valid.cc",
214 "protobuf/src/google/protobuf/stubs/strutil.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000215 "protobuf/src/google/protobuf/stubs/strutil.h",
216 "protobuf/src/google/protobuf/stubs/template_util.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900217 "protobuf/src/google/protobuf/stubs/time.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000218 "protobuf/src/google/protobuf/stubs/time.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900219 "protobuf/src/google/protobuf/wire_format_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000220 "protobuf/src/google/protobuf/wire_format_lite.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900221 ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000222 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100223 configs += [ ":protobuf_config" ]
Joel Fernandes80fc3cd2020-04-01 18:02:57 -0400224 public_configs = [ "//gn:protobuf_gen_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000225 deps = [ "//gn:default_deps" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900226}
227
228source_set("protobuf_full") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100229 visibility = _buildtools_visibility
Oystein Eftevaagdd727e42017-12-05 08:49:55 -0800230 deps = [
231 ":protobuf_lite",
Florian Mayera85b8fa2019-07-11 11:00:48 +0100232 "//gn:default_deps",
Oystein Eftevaagdd727e42017-12-05 08:49:55 -0800233 ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900234 sources = [
235 "protobuf/src/google/protobuf/any.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000236 "protobuf/src/google/protobuf/any.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900237 "protobuf/src/google/protobuf/any.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000238 "protobuf/src/google/protobuf/any.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900239 "protobuf/src/google/protobuf/api.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000240 "protobuf/src/google/protobuf/api.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900241 "protobuf/src/google/protobuf/compiler/importer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000242 "protobuf/src/google/protobuf/compiler/importer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900243 "protobuf/src/google/protobuf/compiler/parser.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000244 "protobuf/src/google/protobuf/compiler/parser.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900245 "protobuf/src/google/protobuf/descriptor.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000246 "protobuf/src/google/protobuf/descriptor.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900247 "protobuf/src/google/protobuf/descriptor.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000248 "protobuf/src/google/protobuf/descriptor.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900249 "protobuf/src/google/protobuf/descriptor_database.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000250 "protobuf/src/google/protobuf/descriptor_database.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900251 "protobuf/src/google/protobuf/duration.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000252 "protobuf/src/google/protobuf/duration.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900253 "protobuf/src/google/protobuf/dynamic_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000254 "protobuf/src/google/protobuf/dynamic_message.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900255 "protobuf/src/google/protobuf/empty.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000256 "protobuf/src/google/protobuf/empty.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900257 "protobuf/src/google/protobuf/extension_set_heavy.cc",
258 "protobuf/src/google/protobuf/field_mask.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000259 "protobuf/src/google/protobuf/field_mask.pb.h",
260 "protobuf/src/google/protobuf/generated_enum_reflection.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900261 "protobuf/src/google/protobuf/generated_message_reflection.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000262 "protobuf/src/google/protobuf/generated_message_reflection.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900263 "protobuf/src/google/protobuf/io/gzip_stream.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000264 "protobuf/src/google/protobuf/io/gzip_stream.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900265 "protobuf/src/google/protobuf/io/printer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000266 "protobuf/src/google/protobuf/io/printer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900267 "protobuf/src/google/protobuf/io/tokenizer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000268 "protobuf/src/google/protobuf/io/tokenizer.h",
269 "protobuf/src/google/protobuf/map_entry.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900270 "protobuf/src/google/protobuf/map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000271 "protobuf/src/google/protobuf/map_field.h",
272 "protobuf/src/google/protobuf/map_field_inl.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900273 "protobuf/src/google/protobuf/message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000274 "protobuf/src/google/protobuf/message.h",
275 "protobuf/src/google/protobuf/metadata.h",
276 "protobuf/src/google/protobuf/reflection.h",
277 "protobuf/src/google/protobuf/reflection_internal.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900278 "protobuf/src/google/protobuf/reflection_ops.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000279 "protobuf/src/google/protobuf/reflection_ops.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900280 "protobuf/src/google/protobuf/service.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000281 "protobuf/src/google/protobuf/service.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900282 "protobuf/src/google/protobuf/source_context.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000283 "protobuf/src/google/protobuf/source_context.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900284 "protobuf/src/google/protobuf/struct.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000285 "protobuf/src/google/protobuf/struct.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900286 "protobuf/src/google/protobuf/stubs/mathlimits.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000287 "protobuf/src/google/protobuf/stubs/mathlimits.h",
288 "protobuf/src/google/protobuf/stubs/mathutil.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900289 "protobuf/src/google/protobuf/stubs/substitute.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000290 "protobuf/src/google/protobuf/stubs/substitute.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900291 "protobuf/src/google/protobuf/text_format.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000292 "protobuf/src/google/protobuf/text_format.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900293 "protobuf/src/google/protobuf/timestamp.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000294 "protobuf/src/google/protobuf/timestamp.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900295 "protobuf/src/google/protobuf/type.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000296 "protobuf/src/google/protobuf/type.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900297 "protobuf/src/google/protobuf/unknown_field_set.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000298 "protobuf/src/google/protobuf/unknown_field_set.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900299 "protobuf/src/google/protobuf/util/field_comparator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000300 "protobuf/src/google/protobuf/util/field_comparator.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900301 "protobuf/src/google/protobuf/util/field_mask_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000302 "protobuf/src/google/protobuf/util/field_mask_util.h",
303 "protobuf/src/google/protobuf/util/internal/constants.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900304 "protobuf/src/google/protobuf/util/internal/datapiece.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000305 "protobuf/src/google/protobuf/util/internal/datapiece.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900306 "protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000307 "protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900308 "protobuf/src/google/protobuf/util/internal/error_listener.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000309 "protobuf/src/google/protobuf/util/internal/error_listener.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900310 "protobuf/src/google/protobuf/util/internal/field_mask_utility.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000311 "protobuf/src/google/protobuf/util/internal/field_mask_utility.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900312 "protobuf/src/google/protobuf/util/internal/json_escaping.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000313 "protobuf/src/google/protobuf/util/internal/json_escaping.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900314 "protobuf/src/google/protobuf/util/internal/json_objectwriter.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000315 "protobuf/src/google/protobuf/util/internal/json_objectwriter.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900316 "protobuf/src/google/protobuf/util/internal/json_stream_parser.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000317 "protobuf/src/google/protobuf/util/internal/json_stream_parser.h",
318 "protobuf/src/google/protobuf/util/internal/location_tracker.h",
319 "protobuf/src/google/protobuf/util/internal/object_location_tracker.h",
320 "protobuf/src/google/protobuf/util/internal/object_source.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900321 "protobuf/src/google/protobuf/util/internal/object_writer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000322 "protobuf/src/google/protobuf/util/internal/object_writer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900323 "protobuf/src/google/protobuf/util/internal/proto_writer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000324 "protobuf/src/google/protobuf/util/internal/proto_writer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900325 "protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000326 "protobuf/src/google/protobuf/util/internal/protostream_objectsource.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900327 "protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000328 "protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h",
329 "protobuf/src/google/protobuf/util/internal/structured_objectwriter.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900330 "protobuf/src/google/protobuf/util/internal/type_info.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000331 "protobuf/src/google/protobuf/util/internal/type_info.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900332 "protobuf/src/google/protobuf/util/internal/type_info_test_helper.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000333 "protobuf/src/google/protobuf/util/internal/type_info_test_helper.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900334 "protobuf/src/google/protobuf/util/internal/utility.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000335 "protobuf/src/google/protobuf/util/internal/utility.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900336 "protobuf/src/google/protobuf/util/json_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000337 "protobuf/src/google/protobuf/util/json_util.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900338 "protobuf/src/google/protobuf/util/message_differencer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000339 "protobuf/src/google/protobuf/util/message_differencer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900340 "protobuf/src/google/protobuf/util/time_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000341 "protobuf/src/google/protobuf/util/time_util.h",
342 "protobuf/src/google/protobuf/util/type_resolver.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900343 "protobuf/src/google/protobuf/util/type_resolver_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000344 "protobuf/src/google/protobuf/util/type_resolver_util.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900345 "protobuf/src/google/protobuf/wire_format.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000346 "protobuf/src/google/protobuf/wire_format.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900347 "protobuf/src/google/protobuf/wrappers.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000348 "protobuf/src/google/protobuf/wrappers.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900349 ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000350 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100351 configs += [ ":protobuf_config" ]
Joel Fernandes80fc3cd2020-04-01 18:02:57 -0400352 public_configs = [ "//gn:protobuf_gen_config" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900353}
354
Primiano Tuccid0001c32019-09-08 22:45:58 -0700355source_set("protoc_lib") {
356 visibility = _buildtools_visibility
357 deps = [
358 ":protobuf_full",
359 "//gn:default_deps",
360 ]
361 sources = [
362 "protobuf/src/google/protobuf/compiler/code_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000363 "protobuf/src/google/protobuf/compiler/code_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700364 "protobuf/src/google/protobuf/compiler/command_line_interface.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000365 "protobuf/src/google/protobuf/compiler/command_line_interface.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700366 "protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000367 "protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700368 "protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000369 "protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700370 "protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000371 "protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700372 "protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000373 "protobuf/src/google/protobuf/compiler/cpp/cpp_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700374 "protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000375 "protobuf/src/google/protobuf/compiler/cpp/cpp_file.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700376 "protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000377 "protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700378 "protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000379 "protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700380 "protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000381 "protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700382 "protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000383 "protobuf/src/google/protobuf/compiler/cpp/cpp_message.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700384 "protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000385 "protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h",
386 "protobuf/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h",
387 "protobuf/src/google/protobuf/compiler/cpp/cpp_options.h",
388 "protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc",
389 "protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700390 "protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000391 "protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700392 "protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000393 "protobuf/src/google/protobuf/compiler/cpp/cpp_service.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700394 "protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000395 "protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700396 "protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000397 "protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700398 "protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000399 "protobuf/src/google/protobuf/compiler/csharp/csharp_enum.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700400 "protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000401 "protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700402 "protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000403 "protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700404 "protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000405 "protobuf/src/google/protobuf/compiler/csharp/csharp_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700406 "protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000407 "protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700408 "protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000409 "protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700410 "protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000411 "protobuf/src/google/protobuf/compiler/csharp/csharp_message.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700412 "protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000413 "protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.h",
414 "protobuf/src/google/protobuf/compiler/csharp/csharp_options.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700415 "protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000416 "protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700417 "protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000418 "protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700419 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000420 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700421 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000422 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700423 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000424 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700425 "protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000426 "protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700427 "protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000428 "protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700429 "protobuf/src/google/protobuf/compiler/java/java_context.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000430 "protobuf/src/google/protobuf/compiler/java/java_context.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700431 "protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000432 "protobuf/src/google/protobuf/compiler/java/java_doc_comment.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700433 "protobuf/src/google/protobuf/compiler/java/java_enum.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000434 "protobuf/src/google/protobuf/compiler/java/java_enum.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700435 "protobuf/src/google/protobuf/compiler/java/java_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000436 "protobuf/src/google/protobuf/compiler/java/java_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700437 "protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000438 "protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700439 "protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000440 "protobuf/src/google/protobuf/compiler/java/java_enum_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700441 "protobuf/src/google/protobuf/compiler/java/java_extension.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000442 "protobuf/src/google/protobuf/compiler/java/java_extension.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700443 "protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000444 "protobuf/src/google/protobuf/compiler/java/java_extension_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700445 "protobuf/src/google/protobuf/compiler/java/java_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000446 "protobuf/src/google/protobuf/compiler/java/java_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700447 "protobuf/src/google/protobuf/compiler/java/java_file.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000448 "protobuf/src/google/protobuf/compiler/java/java_file.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700449 "protobuf/src/google/protobuf/compiler/java/java_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000450 "protobuf/src/google/protobuf/compiler/java/java_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700451 "protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000452 "protobuf/src/google/protobuf/compiler/java/java_generator_factory.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700453 "protobuf/src/google/protobuf/compiler/java/java_helpers.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000454 "protobuf/src/google/protobuf/compiler/java/java_helpers.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700455 "protobuf/src/google/protobuf/compiler/java/java_map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000456 "protobuf/src/google/protobuf/compiler/java/java_map_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700457 "protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000458 "protobuf/src/google/protobuf/compiler/java/java_map_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700459 "protobuf/src/google/protobuf/compiler/java/java_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000460 "protobuf/src/google/protobuf/compiler/java/java_message.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700461 "protobuf/src/google/protobuf/compiler/java/java_message_builder.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000462 "protobuf/src/google/protobuf/compiler/java/java_message_builder.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700463 "protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000464 "protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700465 "protobuf/src/google/protobuf/compiler/java/java_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000466 "protobuf/src/google/protobuf/compiler/java/java_message_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700467 "protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000468 "protobuf/src/google/protobuf/compiler/java/java_message_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700469 "protobuf/src/google/protobuf/compiler/java/java_message_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000470 "protobuf/src/google/protobuf/compiler/java/java_message_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700471 "protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000472 "protobuf/src/google/protobuf/compiler/java/java_name_resolver.h",
473 "protobuf/src/google/protobuf/compiler/java/java_options.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700474 "protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000475 "protobuf/src/google/protobuf/compiler/java/java_primitive_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700476 "protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000477 "protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700478 "protobuf/src/google/protobuf/compiler/java/java_service.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000479 "protobuf/src/google/protobuf/compiler/java/java_service.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700480 "protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000481 "protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700482 "protobuf/src/google/protobuf/compiler/java/java_string_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000483 "protobuf/src/google/protobuf/compiler/java/java_string_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700484 "protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000485 "protobuf/src/google/protobuf/compiler/java/java_string_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700486 "protobuf/src/google/protobuf/compiler/js/js_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000487 "protobuf/src/google/protobuf/compiler/js/js_generator.h",
488 "protobuf/src/google/protobuf/compiler/js/well_known_types_embed.cc",
489 "protobuf/src/google/protobuf/compiler/js/well_known_types_embed.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700490 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000491 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700492 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000493 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700494 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000495 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700496 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000497 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700498 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000499 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700500 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000501 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700502 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000503 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700504 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000505 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700506 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000507 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700508 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000509 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700510 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000511 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700512 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000513 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h",
514 "protobuf/src/google/protobuf/compiler/php/php_generator.cc",
515 "protobuf/src/google/protobuf/compiler/php/php_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700516 "protobuf/src/google/protobuf/compiler/plugin.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000517 "protobuf/src/google/protobuf/compiler/plugin.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700518 "protobuf/src/google/protobuf/compiler/plugin.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000519 "protobuf/src/google/protobuf/compiler/plugin.pb.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700520 "protobuf/src/google/protobuf/compiler/python/python_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000521 "protobuf/src/google/protobuf/compiler/python/python_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700522 "protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000523 "protobuf/src/google/protobuf/compiler/ruby/ruby_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700524 "protobuf/src/google/protobuf/compiler/subprocess.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000525 "protobuf/src/google/protobuf/compiler/subprocess.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700526 "protobuf/src/google/protobuf/compiler/zip_writer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000527 "protobuf/src/google/protobuf/compiler/zip_writer.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700528 ]
529 configs -= [ "//gn/standalone:extra_warnings" ]
530 configs += [ ":protobuf_config" ]
Joel Fernandes80fc3cd2020-04-01 18:02:57 -0400531 public_configs = [ "//gn:protobuf_gen_config" ]
Primiano Tuccid0001c32019-09-08 22:45:58 -0700532}
Primiano Tuccifd484232017-10-25 00:15:39 +0100533
Primiano Tuccid0001c32019-09-08 22:45:58 -0700534if (current_toolchain == host_toolchain) {
Primiano Tuccifd484232017-10-25 00:15:39 +0100535 executable("protoc") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100536 visibility = _buildtools_visibility
Oystein Eftevaagdd727e42017-12-05 08:49:55 -0800537 deps = [
538 ":protoc_lib",
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100539 "//gn:default_deps",
Oystein Eftevaagdd727e42017-12-05 08:49:55 -0800540 ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000541 sources = [ "protobuf/src/google/protobuf/compiler/main.cc" ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000542 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tuccifd484232017-10-25 00:15:39 +0100543 }
Primiano Tucciae2879e2017-09-27 11:02:09 +0900544} # host_toolchain
Primiano Tucci0825bc82017-09-28 18:50:23 +0100545
546if (use_custom_libcxx) {
547 # Config applied to both libc++ and libc++abi targets below.
548 config("libc++config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100549 visibility = _buildtools_visibility
Primiano Tucci0825bc82017-09-28 18:50:23 +0100550 defines = [
551 "LIBCXX_BUILDING_LIBCXXABI",
552 "_LIBCXXABI_NO_EXCEPTIONS",
553 "_LIBCPP_OVERRIDABLE_FUNC_VIS=__attribute__((__visibility__(\"default\")))",
554 ]
555 cflags = [
556 "-fPIC",
557 "-fstrict-aliasing",
558 ]
559 }
560
Primiano Tucci7278dea2017-10-31 11:50:32 +0000561 source_set("libunwind") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100562 visibility = _buildtools_visibility
Primiano Tucci7278dea2017-10-31 11:50:32 +0000563 sources = [
564 "libunwind/src/Unwind-EHABI.cpp",
565 "libunwind/src/Unwind-sjlj.c",
566 "libunwind/src/UnwindLevel1-gcc-ext.c",
567 "libunwind/src/UnwindLevel1.c",
568 "libunwind/src/UnwindRegistersRestore.S",
569 "libunwind/src/UnwindRegistersSave.S",
570 "libunwind/src/libunwind.cpp",
571 ]
572 include_dirs = [ "libunwind/include" ]
573 configs -= [
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000574 "//gn/standalone:extra_warnings",
575 "//gn/standalone:no_exceptions",
576 "//gn/standalone:no_rtti",
Primiano Tucci7278dea2017-10-31 11:50:32 +0000577
578 # When building with msan, libunwind itself triggers memory violations
579 # that causes msan to get stuck into an infinite loop. Just don't
580 # instrument libunwind itself.
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000581 "//gn/standalone/sanitizers:sanitizers_cflags",
Primiano Tucci7278dea2017-10-31 11:50:32 +0000582 ]
583 configs += [
584 ":libc++config",
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000585 "//gn/standalone/sanitizers:sanitizer_options_link_helper",
Primiano Tucci7278dea2017-10-31 11:50:32 +0000586 ]
587 }
588
Primiano Tucci0825bc82017-09-28 18:50:23 +0100589 source_set("libc++abi") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100590 visibility = _buildtools_visibility
Primiano Tucci0825bc82017-09-28 18:50:23 +0100591 sources = [
592 "libcxxabi/src/abort_message.cpp",
593 "libcxxabi/src/cxa_aux_runtime.cpp",
594 "libcxxabi/src/cxa_default_handlers.cpp",
595 "libcxxabi/src/cxa_demangle.cpp",
596 "libcxxabi/src/cxa_exception.cpp",
597 "libcxxabi/src/cxa_exception_storage.cpp",
598 "libcxxabi/src/cxa_guard.cpp",
599 "libcxxabi/src/cxa_handlers.cpp",
600 "libcxxabi/src/cxa_personality.cpp",
601 "libcxxabi/src/cxa_unexpected.cpp",
602 "libcxxabi/src/cxa_vector.cpp",
603 "libcxxabi/src/cxa_virtual.cpp",
604 "libcxxabi/src/fallback_malloc.cpp",
605 "libcxxabi/src/private_typeinfo.cpp",
606 "libcxxabi/src/stdlib_exception.cpp",
607 "libcxxabi/src/stdlib_stdexcept.cpp",
608 "libcxxabi/src/stdlib_typeinfo.cpp",
609 ]
610
611 # On linux this seems to introduce an unwanted glibc 2.18 dependency.
612 if (is_android) {
613 sources += [ "libcxxabi/src/cxa_thread_atexit.cpp" ]
614 }
615 configs -= [
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000616 "//gn/standalone:extra_warnings",
617 "//gn/standalone:no_exceptions",
618 "//gn/standalone:no_rtti",
Primiano Tucci5aab7582017-12-07 12:22:03 +0000619 "//gn/standalone:visibility_hidden",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100620 ]
621 configs += [
622 ":libc++config",
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000623 "//gn/standalone/sanitizers:sanitizer_options_link_helper",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100624 ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000625 deps = [ ":libunwind" ]
Primiano Tucci0825bc82017-09-28 18:50:23 +0100626 }
627
Primiano Tucci7278dea2017-10-31 11:50:32 +0000628 if (custom_libcxx_is_static) {
629 libcxx_target_type = "source_set"
630 } else {
631 libcxx_target_type = "shared_library"
632 }
633
634 target(libcxx_target_type, "libc++") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100635 visibility = _buildtools_visibility
636 visibility += [ "../gn/standalone/libc++:*" ]
Primiano Tucci0825bc82017-09-28 18:50:23 +0100637 sources = [
638 "libcxx/src/algorithm.cpp",
639 "libcxx/src/any.cpp",
640 "libcxx/src/bind.cpp",
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000641 "libcxx/src/charconv.cpp",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100642 "libcxx/src/chrono.cpp",
643 "libcxx/src/condition_variable.cpp",
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000644 "libcxx/src/condition_variable_destructor.cpp",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100645 "libcxx/src/debug.cpp",
646 "libcxx/src/exception.cpp",
647 "libcxx/src/functional.cpp",
648 "libcxx/src/future.cpp",
649 "libcxx/src/hash.cpp",
650 "libcxx/src/ios.cpp",
651 "libcxx/src/iostream.cpp",
652 "libcxx/src/locale.cpp",
653 "libcxx/src/memory.cpp",
654 "libcxx/src/mutex.cpp",
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000655 "libcxx/src/mutex_destructor.cpp",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100656 "libcxx/src/new.cpp",
657 "libcxx/src/optional.cpp",
658 "libcxx/src/random.cpp",
659 "libcxx/src/regex.cpp",
660 "libcxx/src/shared_mutex.cpp",
661 "libcxx/src/stdexcept.cpp",
662 "libcxx/src/string.cpp",
663 "libcxx/src/strstream.cpp",
664 "libcxx/src/system_error.cpp",
665 "libcxx/src/thread.cpp",
666 "libcxx/src/typeinfo.cpp",
667 "libcxx/src/utility.cpp",
668 "libcxx/src/valarray.cpp",
669 "libcxx/src/variant.cpp",
Primiano Tuccic2eb5102018-05-15 10:40:01 +0100670 "libcxx/src/vector.cpp",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100671 ]
672 configs -= [
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000673 "//gn/standalone:extra_warnings",
674 "//gn/standalone:no_exceptions",
675 "//gn/standalone:no_rtti",
Primiano Tucci5aab7582017-12-07 12:22:03 +0000676 "//gn/standalone:visibility_hidden",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100677 ]
678 configs += [
679 ":libc++config",
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000680 "//gn/standalone/sanitizers:sanitizer_options_link_helper",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100681 ]
682 defines = [ "_LIBCPP_BUILDING_LIBRARY" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000683 if ((is_linux || is_android) && (is_asan || is_tsan || is_msan)) {
684 # In {a,t,m}san configurations, operator new and operator delete will be
685 # provided by the sanitizer runtime library. Since libc++ defines these
686 # symbols with weak linkage, and the *san runtime uses strong linkage, it
687 # should technically be OK to omit this, but it's added to be explicit.
688 defines += [ "_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS" ]
689 }
690 deps = [ ":libc++abi" ]
Primiano Tucci0825bc82017-09-28 18:50:23 +0100691 }
692} # if (use_custom_libcxx)
Hector Dearman88a10112017-10-12 11:07:10 +0100693
694config("benchmark_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100695 visibility = _buildtools_visibility
Primiano Tucci2a29ac72017-10-24 17:47:19 +0100696 include_dirs = [ "benchmark/include" ]
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100697 configs = [ ":test_warning_suppressions" ]
Hector Dearman88a10112017-10-12 11:07:10 +0100698}
699
700source_set("benchmark") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100701 visibility = _buildtools_visibility
Hector Dearman88a10112017-10-12 11:07:10 +0100702 testonly = true
703 sources = [
704 "benchmark/include/benchmark/benchmark.h",
Hector Dearman88a10112017-10-12 11:07:10 +0100705 "benchmark/src/arraysize.h",
706 "benchmark/src/benchmark.cc",
Primiano Tucci5acece02020-06-04 10:39:53 +0100707 "benchmark/src/benchmark_api_internal.cc",
Hector Dearman88a10112017-10-12 11:07:10 +0100708 "benchmark/src/benchmark_api_internal.h",
Primiano Tucci5acece02020-06-04 10:39:53 +0100709 "benchmark/src/benchmark_name.cc",
Hector Dearman88a10112017-10-12 11:07:10 +0100710 "benchmark/src/benchmark_register.cc",
Primiano Tucci5acece02020-06-04 10:39:53 +0100711 "benchmark/src/benchmark_register.h",
712 "benchmark/src/benchmark_runner.cc",
713 "benchmark/src/benchmark_runner.h",
Hector Dearman88a10112017-10-12 11:07:10 +0100714 "benchmark/src/check.h",
715 "benchmark/src/colorprint.cc",
716 "benchmark/src/colorprint.h",
717 "benchmark/src/commandlineflags.cc",
718 "benchmark/src/commandlineflags.h",
719 "benchmark/src/complexity.cc",
720 "benchmark/src/complexity.h",
721 "benchmark/src/console_reporter.cc",
722 "benchmark/src/counter.cc",
723 "benchmark/src/counter.h",
724 "benchmark/src/csv_reporter.cc",
725 "benchmark/src/cycleclock.h",
726 "benchmark/src/internal_macros.h",
727 "benchmark/src/json_reporter.cc",
728 "benchmark/src/log.h",
729 "benchmark/src/mutex.h",
730 "benchmark/src/re.h",
731 "benchmark/src/reporter.cc",
732 "benchmark/src/sleep.cc",
733 "benchmark/src/sleep.h",
Lalit Magantic99d93c2018-03-22 15:09:30 +0000734 "benchmark/src/statistics.cc",
735 "benchmark/src/statistics.h",
Hector Dearman88a10112017-10-12 11:07:10 +0100736 "benchmark/src/string_util.cc",
737 "benchmark/src/string_util.h",
738 "benchmark/src/sysinfo.cc",
Primiano Tucci5acece02020-06-04 10:39:53 +0100739 "benchmark/src/thread_manager.h",
740 "benchmark/src/thread_timer.h",
Hector Dearman88a10112017-10-12 11:07:10 +0100741 "benchmark/src/timers.cc",
742 "benchmark/src/timers.h",
743 ]
744 defines = [ "HAVE_POSIX_REGEX" ]
745 public_configs = [ ":benchmark_config" ]
746 all_dependent_configs = [ ":benchmark_config" ]
Primiano Tucci5acece02020-06-04 10:39:53 +0100747 cflags = [ "-Wno-deprecated-declarations" ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000748 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000749 deps = [ "//gn:default_deps" ]
Hector Dearman88a10112017-10-12 11:07:10 +0100750}
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200751
752# On Linux/Android use libbacktrace in debug builds for better stacktraces.
753if (is_linux || is_android) {
754 config("libbacktrace_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100755 visibility = _buildtools_visibility
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200756 include_dirs = [
757 "libbacktrace_config",
758 "libbacktrace",
759 ]
760 cflags = [
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100761 # We force include this config file because "config.h" is too generic as a
762 # file name and on some platforms #include "config.h" ends up colliding
763 # importing some other project's config.h.
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200764 "-include",
765 rebase_path("libbacktrace_config/config.h", root_build_dir),
766 ]
767 }
768
769 source_set("libbacktrace") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100770 visibility = _buildtools_visibility
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200771 sources = [
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200772 "libbacktrace/dwarf.c",
773 "libbacktrace/elf.c",
774 "libbacktrace/fileline.c",
775 "libbacktrace/mmap.c",
776 "libbacktrace/mmapio.c",
777 "libbacktrace/posix.c",
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200778 "libbacktrace/sort.c",
779 "libbacktrace/state.c",
780 ]
781 configs -= [ "//gn/standalone:extra_warnings" ]
782 public_configs = [ ":libbacktrace_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000783 deps = [ "//gn:default_deps" ]
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200784 }
785}
Lalit Magantib123f262018-05-22 14:05:03 +0100786
787config("sqlite_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100788 visibility = _buildtools_visibility
Lalit Magantib123f262018-05-22 14:05:03 +0100789 include_dirs = [ "sqlite" ]
790 cflags = [
791 "-DSQLITE_THREADSAFE=0",
792 "-DQLITE_DEFAULT_MEMSTATUS=0",
793 "-DSQLITE_LIKE_DOESNT_MATCH_BLOBS",
Lalit Magantib123f262018-05-22 14:05:03 +0100794 "-DSQLITE_OMIT_DEPRECATED",
795 "-DSQLITE_OMIT_SHARED_CACHE",
796 "-DHAVE_USLEEP",
797 "-DHAVE_UTIME",
798 "-DSQLITE_BYTEORDER=1234",
799 "-DSQLITE_DEFAULT_AUTOVACUUM=0",
800 "-DSQLITE_DEFAULT_MMAP_SIZE=0",
801 "-DSQLITE_CORE",
Lalit Maganti8d31c732018-06-21 14:23:04 +0100802 "-DSQLITE_TEMP_STORE=3",
Lalit Magantic6347f02018-06-25 14:03:46 +0100803 "-DSQLITE_OMIT_LOAD_EXTENSION",
Hector Dearman7af33572018-09-19 17:42:25 +0100804 "-DSQLITE_OMIT_RANDOMNESS",
Lalit Maganti1e5630e2020-01-29 12:34:14 +0000805 "-DSQLITE_OMIT_AUTOINIT",
Lalit Magantie1fdf552020-02-06 17:20:16 +0000806 "-DSQLITE_ENABLE_JSON1",
Lalit Magantib123f262018-05-22 14:05:03 +0100807 ]
808}
809
810source_set("sqlite") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100811 visibility = _buildtools_visibility
Lalit Magantib123f262018-05-22 14:05:03 +0100812 sources = [
813 "sqlite/sqlite3.c",
814 "sqlite/sqlite3.h",
815 "sqlite/sqlite3ext.h",
Ioannis Ilkos178535e2018-11-05 17:32:45 +0000816 "sqlite_src/ext/misc/percentile.c",
Lalit Magantib123f262018-05-22 14:05:03 +0100817 ]
818 configs -= [ "//gn/standalone:extra_warnings" ]
819 public_configs = [ ":sqlite_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000820 deps = [ "//gn:default_deps" ]
Lalit Magantib123f262018-05-22 14:05:03 +0100821}
822
823source_set("sqlite_shell") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100824 visibility = _buildtools_visibility
Lalit Magantib123f262018-05-22 14:05:03 +0100825 testonly = true
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000826 sources = [ "sqlite/shell.c" ]
Lalit Magantib123f262018-05-22 14:05:03 +0100827 configs -= [ "//gn/standalone:extra_warnings" ]
828 deps = [
829 ":sqlite",
Florian Mayera85b8fa2019-07-11 11:00:48 +0100830 "//gn:default_deps",
Lalit Magantib123f262018-05-22 14:05:03 +0100831 ]
832}
Primiano Tucci0d72a312018-08-07 14:42:45 +0100833
Florian Mayer475bd7e2018-08-07 20:04:03 +0100834source_set("lzma") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100835 visibility = _buildtools_visibility
Florian Mayer475bd7e2018-08-07 20:04:03 +0100836 defines = [ "_7ZIP_ST" ]
837 sources = [
838 "lzma/C/7zAlloc.c",
839 "lzma/C/7zArcIn.c",
840 "lzma/C/7zBuf.c",
841 "lzma/C/7zBuf2.c",
842 "lzma/C/7zCrc.c",
843 "lzma/C/7zCrcOpt.c",
844 "lzma/C/7zDec.c",
845 "lzma/C/7zFile.c",
846 "lzma/C/7zStream.c",
847 "lzma/C/Aes.c",
848 "lzma/C/AesOpt.c",
849 "lzma/C/Alloc.c",
850 "lzma/C/Bcj2.c",
851 "lzma/C/Bra.c",
852 "lzma/C/Bra86.c",
853 "lzma/C/BraIA64.c",
854 "lzma/C/CpuArch.c",
855 "lzma/C/Delta.c",
856 "lzma/C/LzFind.c",
857 "lzma/C/Lzma2Dec.c",
858 "lzma/C/Lzma2Enc.c",
859 "lzma/C/Lzma86Dec.c",
860 "lzma/C/Lzma86Enc.c",
861 "lzma/C/LzmaDec.c",
862 "lzma/C/LzmaEnc.c",
863 "lzma/C/LzmaLib.c",
864 "lzma/C/Ppmd7.c",
865 "lzma/C/Ppmd7Dec.c",
866 "lzma/C/Ppmd7Enc.c",
867 "lzma/C/Sha256.c",
868 "lzma/C/Sort.c",
869 "lzma/C/Xz.c",
870 "lzma/C/XzCrc64.c",
871 "lzma/C/XzCrc64Opt.c",
872 "lzma/C/XzDec.c",
873 "lzma/C/XzEnc.c",
874 "lzma/C/XzIn.c",
875 ]
876 configs -= [ "//gn/standalone:extra_warnings" ]
877 cflags = [
878 "-Wno-empty-body",
879 "-Wno-enum-conversion",
880 ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000881 deps = [ "//gn:default_deps" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +0100882}
Florian Mayera2fae262018-08-31 12:10:01 -0700883
Hector Dearmane0b993f2019-05-24 18:48:16 +0100884source_set("zlib") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100885 visibility = _buildtools_visibility
Hector Dearmane0b993f2019-05-24 18:48:16 +0100886 sources = [
887 "zlib/src/adler32.c",
888 "zlib/src/compress.c",
889 "zlib/src/crc32.c",
890 "zlib/src/deflate.c",
891 "zlib/src/gzclose.c",
892 "zlib/src/gzlib.c",
893 "zlib/src/gzread.c",
894 "zlib/src/gzwrite.c",
895 "zlib/src/infback.c",
896 "zlib/src/inffast.c",
897 "zlib/src/inflate.c",
898 "zlib/src/inftrees.c",
899 "zlib/src/trees.c",
900 "zlib/src/uncompr.c",
901 "zlib/src/zutil.c",
902 ]
903 configs -= [ "//gn/standalone:extra_warnings" ]
904 cflags = []
905 public_configs = [ ":zlib_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000906 deps = [ "//gn:default_deps" ]
Hector Dearmane0b993f2019-05-24 18:48:16 +0100907}
908
909config("zlib_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100910 visibility = _buildtools_visibility
Primiano Tucci225a4e62019-06-06 11:13:57 +0100911 defines = [ "HAVE_HIDDEN" ]
Hector Dearman554627f2019-06-04 17:58:22 +0100912 cflags = [
913 # Using -isystem instead of include_dirs (-I), so we don't need to suppress
914 # warnings coming from third-party headers. Doing so would mask warnings in
915 # our own code.
916 "-isystem",
917 rebase_path("zlib/src", root_build_dir),
918 ]
Hector Dearmane0b993f2019-05-24 18:48:16 +0100919}
920
Florian Mayer475bd7e2018-08-07 20:04:03 +0100921source_set("libunwindstack") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100922 visibility = _buildtools_visibility
Florian Mayer475bd7e2018-08-07 20:04:03 +0100923 include_dirs = [
Florian Mayerf8335662018-08-08 11:30:32 +0100924 "android-core/libunwindstack/include",
925 "android-core/libunwindstack",
926 "android-core/base/include",
927 "android-core/liblog/include",
928 "android-core/libprocinfo/include",
929 "android-core/include",
Florian Mayer475bd7e2018-08-07 20:04:03 +0100930 "lzma/C",
931 ]
932 deps = [
933 ":lzma",
Florian Mayera85b8fa2019-07-11 11:00:48 +0100934 "//gn:default_deps",
Florian Mayer475bd7e2018-08-07 20:04:03 +0100935 ]
Florian Mayer475bd7e2018-08-07 20:04:03 +0100936 sources = [
Florian Mayerf8335662018-08-08 11:30:32 +0100937 "android-core/base/file.cpp",
Florian Mayerce11bea2020-01-23 19:47:58 +0000938 "android-core/base/liblog_symbols.cpp",
Florian Mayerf8335662018-08-08 11:30:32 +0100939 "android-core/base/logging.cpp",
940 "android-core/base/stringprintf.cpp",
941 "android-core/base/strings.cpp",
942 "android-core/base/threads.cpp",
Florian Mayerce11bea2020-01-23 19:47:58 +0000943 "android-core/liblog/logger_write.cpp",
Florian Mayerfd78c442020-08-14 12:48:29 +0100944 "android-core/liblog/properties.cpp",
Florian Mayerf8335662018-08-08 11:30:32 +0100945 "android-core/libunwindstack/ArmExidx.cpp",
946 "android-core/libunwindstack/DwarfCfa.cpp",
947 "android-core/libunwindstack/DwarfEhFrameWithHdr.cpp",
948 "android-core/libunwindstack/DwarfMemory.cpp",
949 "android-core/libunwindstack/DwarfOp.cpp",
950 "android-core/libunwindstack/DwarfSection.cpp",
951 "android-core/libunwindstack/Elf.cpp",
952 "android-core/libunwindstack/ElfInterface.cpp",
953 "android-core/libunwindstack/ElfInterfaceArm.cpp",
Florian Mayer86120f62018-10-23 15:19:46 +0100954 "android-core/libunwindstack/Global.cpp",
Florian Mayerf8335662018-08-08 11:30:32 +0100955 "android-core/libunwindstack/JitDebug.cpp",
956 "android-core/libunwindstack/LocalUnwinder.cpp",
957 "android-core/libunwindstack/Log.cpp",
958 "android-core/libunwindstack/MapInfo.cpp",
959 "android-core/libunwindstack/Maps.cpp",
960 "android-core/libunwindstack/Memory.cpp",
961 "android-core/libunwindstack/Regs.cpp",
962 "android-core/libunwindstack/RegsArm.cpp",
963 "android-core/libunwindstack/RegsArm64.cpp",
964 "android-core/libunwindstack/RegsMips.cpp",
965 "android-core/libunwindstack/RegsMips64.cpp",
966 "android-core/libunwindstack/RegsX86.cpp",
967 "android-core/libunwindstack/RegsX86_64.cpp",
968 "android-core/libunwindstack/Symbols.cpp",
969 "android-core/libunwindstack/Unwinder.cpp",
Florian Mayer475bd7e2018-08-07 20:04:03 +0100970 ]
971 if (current_cpu == "x86") {
Florian Mayerf8335662018-08-08 11:30:32 +0100972 sources += [ "android-core/libunwindstack/AsmGetRegsX86.S" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +0100973 } else if (current_cpu == "x64") {
Florian Mayerf8335662018-08-08 11:30:32 +0100974 sources += [ "android-core/libunwindstack/AsmGetRegsX86_64.S" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +0100975 }
976 configs -= [
977 "//gn/standalone:extra_warnings",
978 "//gn/standalone:c++11",
Florian Mayera2fae262018-08-31 12:10:01 -0700979 "//gn/standalone:visibility_hidden",
Florian Mayer475bd7e2018-08-07 20:04:03 +0100980 ]
Florian Mayerce11bea2020-01-23 19:47:58 +0000981 cflags = [ "-DFAKE_LOG_DEVICE=1" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +0100982 configs += [ "//gn/standalone:c++17" ]
983 public_configs = [ ":libunwindstack_config" ]
984}
985
Ryan Savitski56bc0c62020-01-27 13:50:02 +0000986config("bionic_kernel_uapi_headers") {
987 visibility = _buildtools_visibility
988 cflags = [
989 "-isystem",
990 rebase_path("bionic/libc/kernel", root_build_dir),
991 ]
992}
993
Primiano Tucci0d72a312018-08-07 14:42:45 +0100994config("jsoncpp_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100995 visibility = _buildtools_visibility
Primiano Tucci0d72a312018-08-07 14:42:45 +0100996 cflags = [
997 "-DJSON_USE_EXCEPTION=0",
998
999 # Using -isystem instead of include_dirs (-I), so we don't need to suppress
Florian Mayerbda0c442018-09-07 10:53:55 +01001000 # warnings coming from third-party headers. Doing so would mask warnings in
Primiano Tucci0d72a312018-08-07 14:42:45 +01001001 # our own code.
1002 "-isystem",
1003 rebase_path("jsoncpp/include", root_build_dir),
1004 ]
1005}
1006
1007source_set("jsoncpp") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +01001008 visibility = _buildtools_visibility
Primiano Tucci0d72a312018-08-07 14:42:45 +01001009 sources = [
1010 "jsoncpp/src/lib_json/json_reader.cpp",
1011 "jsoncpp/src/lib_json/json_value.cpp",
1012 "jsoncpp/src/lib_json/json_writer.cpp",
1013 ]
1014 configs -= [ "//gn/standalone:extra_warnings" ]
1015 public_configs = [ ":jsoncpp_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +00001016 deps = [ "//gn:default_deps" ]
Primiano Tucci0d72a312018-08-07 14:42:45 +01001017}
Hector Dearmane44ad452018-09-21 11:51:57 +01001018
1019config("linenoise_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +01001020 visibility = _buildtools_visibility
Hector Dearmane44ad452018-09-21 11:51:57 +01001021 cflags = [
1022 # Using -isystem instead of include_dirs (-I), so we don't need to suppress
1023 # warnings coming from third-party headers. Doing so would mask warnings in
1024 # our own code.
1025 "-isystem",
1026 rebase_path("linenoise", root_build_dir),
1027 ]
1028}
1029
1030source_set("linenoise") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +01001031 visibility = _buildtools_visibility
Hector Dearmane44ad452018-09-21 11:51:57 +01001032 sources = [
1033 "linenoise/linenoise.c",
1034 "linenoise/linenoise.h",
1035 ]
1036 configs -= [ "//gn/standalone:extra_warnings" ]
1037 public_configs = [ ":linenoise_config" ]
Lalit Magantiedace412019-06-18 13:28:28 +01001038 cflags = [ "-Wno-tautological-unsigned-zero-compare" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +00001039 deps = [ "//gn:default_deps" ]
Hector Dearmane44ad452018-09-21 11:51:57 +01001040}
Primiano Tuccia65497e2018-09-26 19:53:58 +01001041
Primiano Tucci780deea2018-10-11 09:28:05 +01001042if (use_libfuzzer) {
1043 source_set("libfuzzer") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +01001044 visibility = _buildtools_visibility
Primiano Tucci780deea2018-10-11 09:28:05 +01001045 configs -= [
1046 "//gn/standalone:extra_warnings",
1047 "//gn/standalone/sanitizers:sanitizers_cflags",
1048 ]
1049 sources = [
1050 "libfuzzer/FuzzerCrossOver.cpp",
1051 "libfuzzer/FuzzerDataFlowTrace.cpp",
1052 "libfuzzer/FuzzerDriver.cpp",
1053 "libfuzzer/FuzzerExtFunctionsDlsym.cpp",
1054 "libfuzzer/FuzzerExtFunctionsWeak.cpp",
Florian Mayera85b8fa2019-07-11 11:00:48 +01001055 "libfuzzer/FuzzerExtFunctionsWindows.cpp",
Primiano Tucci780deea2018-10-11 09:28:05 +01001056 "libfuzzer/FuzzerExtraCounters.cpp",
Florian Mayera85b8fa2019-07-11 11:00:48 +01001057 "libfuzzer/FuzzerFork.cpp",
Primiano Tucci780deea2018-10-11 09:28:05 +01001058 "libfuzzer/FuzzerIO.cpp",
1059 "libfuzzer/FuzzerIOPosix.cpp",
1060 "libfuzzer/FuzzerIOWindows.cpp",
1061 "libfuzzer/FuzzerLoop.cpp",
1062 "libfuzzer/FuzzerMain.cpp",
1063 "libfuzzer/FuzzerMerge.cpp",
1064 "libfuzzer/FuzzerMutate.cpp",
1065 "libfuzzer/FuzzerSHA1.cpp",
Primiano Tucci780deea2018-10-11 09:28:05 +01001066 "libfuzzer/FuzzerTracePC.cpp",
1067 "libfuzzer/FuzzerUtil.cpp",
1068 "libfuzzer/FuzzerUtilDarwin.cpp",
1069 "libfuzzer/FuzzerUtilFuchsia.cpp",
1070 "libfuzzer/FuzzerUtilLinux.cpp",
1071 "libfuzzer/FuzzerUtilPosix.cpp",
1072 "libfuzzer/FuzzerUtilWindows.cpp",
1073 ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +00001074 deps = [ "//gn:default_deps" ]
Primiano Tucci780deea2018-10-11 09:28:05 +01001075 }
Primiano Tuccia65497e2018-09-26 19:53:58 +01001076}