blob: 857c2d91a5b51c186b6a5b91e03f6d3a021a2ce6 [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",
48 ]
Matthew Clarkson83987d22019-10-03 17:30:53 +010049 } else {
50 cflags = [
51 "-Wno-unknown-warning-option",
52 "-Wno-deprecated-copy",
53 ]
Primiano Tucci919ca1e2019-08-21 20:26:58 +020054 }
Primiano Tucci2a29ac72017-10-24 17:47:19 +010055}
56
Florian Mayer475bd7e2018-08-07 20:04:03 +010057config("libunwindstack_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +010058 visibility = _buildtools_visibility
Florian Mayer475bd7e2018-08-07 20:04:03 +010059 cflags = [
60 # Using -isystem instead of include_dirs (-I), so we don't need to suppress
Florian Mayerf8335662018-08-08 11:30:32 +010061 # warnings coming from libunwindstack headers. Doing so would mask warnings
62 # in our own code.
Florian Mayer475bd7e2018-08-07 20:04:03 +010063 "-isystem",
Florian Mayerf8335662018-08-08 11:30:32 +010064 rebase_path("android-core/libunwindstack/include", root_build_dir),
Florian Mayerb64d6b12018-08-30 10:46:30 -070065 "-isystem",
66 rebase_path("android-core/libprocinfo/include", root_build_dir),
67 "-isystem",
68 rebase_path("android-core/base/include", root_build_dir),
Florian Mayer6140f322019-01-21 15:10:17 +000069 "-isystem",
70 rebase_path("android-core/demangle/include", root_build_dir),
Florian Mayer475bd7e2018-08-07 20:04:03 +010071 ]
Florian Mayerb64d6b12018-08-30 10:46:30 -070072 if (is_android) {
73 cflags += [
74 "-isystem",
75 rebase_path("bionic/libc/include", root_build_dir),
76 ]
77 }
Florian Mayer12adafd2019-03-14 21:58:00 -070078 defines = [ "NO_LIBDEXFILE_SUPPORT" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +010079}
80
Primiano Tucci2a29ac72017-10-24 17:47:19 +010081# Config to include gtest.h in test targets.
Primiano Tucciae2879e2017-09-27 11:02:09 +090082config("googletest_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +010083 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +090084 defines = [ "GTEST_LANG_CXX11=1" ]
Primiano Tucci919ca1e2019-08-21 20:26:58 +020085 include_dirs = [
86 "googletest/googletest/include",
87 "googletest/googlemock/include",
Primiano Tucciae2879e2017-09-27 11:02:09 +090088 ]
Primiano Tucci3cbb10a2018-04-10 17:52:40 +010089 configs = [ ":test_warning_suppressions" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +090090}
91
92source_set("gtest") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +010093 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +090094 testonly = true
95 include_dirs = [ "googletest/googletest" ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +000096 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +090097 public_configs = [ ":googletest_config" ]
98 all_dependent_configs = [ ":googletest_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +000099 sources = [ "googletest/googletest/src/gtest-all.cc" ]
100 deps = [ "//gn:default_deps" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900101}
102
103source_set("gtest_main") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100104 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +0900105 testonly = true
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000106 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900107 configs += [ ":googletest_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000108 sources = [ "googletest/googletest/src/gtest_main.cc" ]
109 deps = [ "//gn:default_deps" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900110}
111
112source_set("gmock") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100113 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +0900114 testonly = true
115 include_dirs = [ "googletest/googlemock" ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000116 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900117 public_configs = [ ":googletest_config" ]
118 all_dependent_configs = [ ":googletest_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000119 sources = [ "googletest/googlemock/src/gmock-all.cc" ]
120 deps = [ "//gn:default_deps" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900121}
122
Primiano Tuccifd484232017-10-25 00:15:39 +0100123# This config is applied to the autogenerated .pb.{cc,h} files in
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000124# //gn/standalone/proto_library.gni. This config is propagated up to the source sets
Primiano Tuccifd484232017-10-25 00:15:39 +0100125# that depend on generated proto headers. Therefore this should stay as lean and
126# clean as possible in terms of -W-no* suppressions. Thankfully the
127# autogenerated .pb.h headers violate less warnings than the libprotobuf_*
128# library itself.
129config("protobuf_gen_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100130 visibility = [ "*" ] # This is injected by standalone/proto_library.gni
Primiano Tucciae2879e2017-09-27 11:02:09 +0900131 defines = [
132 "GOOGLE_PROTOBUF_NO_RTTI",
133 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900134 ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900135 cflags = [
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100136 # Using -isystem instead of include_dirs (-I), so we don't need to suppress
137 # warnings coming from libprotobuf headers. Doing so would mask warnings in
138 # our own code.
139 "-isystem",
140 rebase_path("protobuf/src", root_build_dir),
141 "-Wno-unknown-warning-option",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900142 "-Wno-deprecated",
Primiano Tuccid7d1be02017-10-30 17:41:34 +0000143 "-Wno-undef",
Primiano Tuccifd484232017-10-25 00:15:39 +0100144 "-Wno-zero-as-null-pointer-constant",
145 ]
Primiano Tuccifd484232017-10-25 00:15:39 +0100146}
147
148# Configuration used to build libprotobuf_* and the protoc compiler.
149config("protobuf_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100150 visibility = _buildtools_visibility
151
Primiano Tuccifd484232017-10-25 00:15:39 +0100152 # Apply the lighter supressions and macro definitions from above.
153 configs = [ ":protobuf_gen_config" ]
154
Primiano Tuccifd484232017-10-25 00:15:39 +0100155 defines = [ "HAVE_PTHREAD=1" ]
Hector Dearmanedb3beb2017-10-09 17:53:36 +0100156 if (is_clang) {
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100157 cflags = [
158 "-Wno-unknown-warning-option",
Primiano Tuccib60d4b02017-11-10 11:03:00 +0000159 "-Wno-enum-compare-switch",
Primiano Tuccib60d4b02017-11-10 11:03:00 +0000160 "-Wno-user-defined-warnings",
Florian Mayeraa5316b2018-08-20 17:45:12 -0700161 "-Wno-tautological-constant-compare",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900162 ]
Ryan Savitskie0d8eab2019-08-15 19:04:38 +0100163 } else { # implies gcc
164 cflags = [ "-Wno-return-type" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900165 }
166}
167
168source_set("protobuf_lite") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100169 visibility = _buildtools_visibility
Primiano Tucciae2879e2017-09-27 11:02:09 +0900170 sources = [
Primiano Tuccif550b252019-12-03 11:06:02 +0000171 "protobuf/src/google/protobuf/any_lite.cc",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900172 "protobuf/src/google/protobuf/arena.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000173 "protobuf/src/google/protobuf/arena.h",
174 "protobuf/src/google/protobuf/arena_impl.h",
175 "protobuf/src/google/protobuf/arenastring.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900176 "protobuf/src/google/protobuf/extension_set.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000177 "protobuf/src/google/protobuf/extension_set.h",
178 "protobuf/src/google/protobuf/generated_enum_util.cc",
179 "protobuf/src/google/protobuf/generated_enum_util.h",
180 "protobuf/src/google/protobuf/generated_message_table_driven_lite.cc",
181 "protobuf/src/google/protobuf/generated_message_table_driven_lite.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900182 "protobuf/src/google/protobuf/generated_message_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000183 "protobuf/src/google/protobuf/generated_message_util.h",
184 "protobuf/src/google/protobuf/has_bits.h",
185 "protobuf/src/google/protobuf/implicit_weak_message.cc",
186 "protobuf/src/google/protobuf/implicit_weak_message.h",
187 "protobuf/src/google/protobuf/inlined_string_field.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900188 "protobuf/src/google/protobuf/io/coded_stream.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000189 "protobuf/src/google/protobuf/io/coded_stream.h",
190 "protobuf/src/google/protobuf/io/coded_stream_inl.h",
191 "protobuf/src/google/protobuf/io/io_win32.cc",
192 "protobuf/src/google/protobuf/io/io_win32.h",
193 "protobuf/src/google/protobuf/io/strtod.cc",
194 "protobuf/src/google/protobuf/io/strtod.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900195 "protobuf/src/google/protobuf/io/zero_copy_stream.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000196 "protobuf/src/google/protobuf/io/zero_copy_stream.h",
197 "protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc",
198 "protobuf/src/google/protobuf/io/zero_copy_stream_impl.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900199 "protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000200 "protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h",
201 "protobuf/src/google/protobuf/map.h",
202 "protobuf/src/google/protobuf/map_entry_lite.h",
203 "protobuf/src/google/protobuf/map_field_lite.h",
204 "protobuf/src/google/protobuf/map_type_handler.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900205 "protobuf/src/google/protobuf/message_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000206 "protobuf/src/google/protobuf/message_lite.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900207 "protobuf/src/google/protobuf/repeated_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000208 "protobuf/src/google/protobuf/repeated_field.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900209 "protobuf/src/google/protobuf/stubs/bytestream.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000210 "protobuf/src/google/protobuf/stubs/bytestream.h",
211 "protobuf/src/google/protobuf/stubs/callback.h",
212 "protobuf/src/google/protobuf/stubs/casts.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900213 "protobuf/src/google/protobuf/stubs/common.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000214 "protobuf/src/google/protobuf/stubs/common.h",
215 "protobuf/src/google/protobuf/stubs/fastmem.h",
216 "protobuf/src/google/protobuf/stubs/hash.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900217 "protobuf/src/google/protobuf/stubs/int128.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000218 "protobuf/src/google/protobuf/stubs/int128.h",
219 "protobuf/src/google/protobuf/stubs/logging.h",
220 "protobuf/src/google/protobuf/stubs/macros.h",
221 "protobuf/src/google/protobuf/stubs/map_util.h",
222 "protobuf/src/google/protobuf/stubs/mutex.h",
223 "protobuf/src/google/protobuf/stubs/once.h",
224 "protobuf/src/google/protobuf/stubs/platform_macros.h",
225 "protobuf/src/google/protobuf/stubs/port.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900226 "protobuf/src/google/protobuf/stubs/status.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000227 "protobuf/src/google/protobuf/stubs/status.h",
228 "protobuf/src/google/protobuf/stubs/status_macros.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900229 "protobuf/src/google/protobuf/stubs/statusor.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000230 "protobuf/src/google/protobuf/stubs/statusor.h",
231 "protobuf/src/google/protobuf/stubs/stl_util.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900232 "protobuf/src/google/protobuf/stubs/stringpiece.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000233 "protobuf/src/google/protobuf/stubs/stringpiece.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900234 "protobuf/src/google/protobuf/stubs/stringprintf.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000235 "protobuf/src/google/protobuf/stubs/stringprintf.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900236 "protobuf/src/google/protobuf/stubs/structurally_valid.cc",
237 "protobuf/src/google/protobuf/stubs/strutil.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000238 "protobuf/src/google/protobuf/stubs/strutil.h",
239 "protobuf/src/google/protobuf/stubs/template_util.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900240 "protobuf/src/google/protobuf/stubs/time.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000241 "protobuf/src/google/protobuf/stubs/time.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900242 "protobuf/src/google/protobuf/wire_format_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000243 "protobuf/src/google/protobuf/wire_format_lite.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900244 ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000245 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100246 configs += [ ":protobuf_config" ]
247 public_configs = [ ":protobuf_gen_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000248 deps = [ "//gn:default_deps" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900249}
250
251source_set("protobuf_full") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100252 visibility = _buildtools_visibility
Oystein Eftevaagdd727e42017-12-05 08:49:55 -0800253 deps = [
254 ":protobuf_lite",
Florian Mayera85b8fa2019-07-11 11:00:48 +0100255 "//gn:default_deps",
Oystein Eftevaagdd727e42017-12-05 08:49:55 -0800256 ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900257 sources = [
258 "protobuf/src/google/protobuf/any.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000259 "protobuf/src/google/protobuf/any.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900260 "protobuf/src/google/protobuf/any.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000261 "protobuf/src/google/protobuf/any.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900262 "protobuf/src/google/protobuf/api.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000263 "protobuf/src/google/protobuf/api.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900264 "protobuf/src/google/protobuf/compiler/importer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000265 "protobuf/src/google/protobuf/compiler/importer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900266 "protobuf/src/google/protobuf/compiler/parser.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000267 "protobuf/src/google/protobuf/compiler/parser.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900268 "protobuf/src/google/protobuf/descriptor.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000269 "protobuf/src/google/protobuf/descriptor.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900270 "protobuf/src/google/protobuf/descriptor.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000271 "protobuf/src/google/protobuf/descriptor.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900272 "protobuf/src/google/protobuf/descriptor_database.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000273 "protobuf/src/google/protobuf/descriptor_database.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900274 "protobuf/src/google/protobuf/duration.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000275 "protobuf/src/google/protobuf/duration.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900276 "protobuf/src/google/protobuf/dynamic_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000277 "protobuf/src/google/protobuf/dynamic_message.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900278 "protobuf/src/google/protobuf/empty.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000279 "protobuf/src/google/protobuf/empty.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900280 "protobuf/src/google/protobuf/extension_set_heavy.cc",
281 "protobuf/src/google/protobuf/field_mask.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000282 "protobuf/src/google/protobuf/field_mask.pb.h",
283 "protobuf/src/google/protobuf/generated_enum_reflection.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900284 "protobuf/src/google/protobuf/generated_message_reflection.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000285 "protobuf/src/google/protobuf/generated_message_reflection.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900286 "protobuf/src/google/protobuf/io/gzip_stream.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000287 "protobuf/src/google/protobuf/io/gzip_stream.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900288 "protobuf/src/google/protobuf/io/printer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000289 "protobuf/src/google/protobuf/io/printer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900290 "protobuf/src/google/protobuf/io/tokenizer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000291 "protobuf/src/google/protobuf/io/tokenizer.h",
292 "protobuf/src/google/protobuf/map_entry.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900293 "protobuf/src/google/protobuf/map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000294 "protobuf/src/google/protobuf/map_field.h",
295 "protobuf/src/google/protobuf/map_field_inl.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900296 "protobuf/src/google/protobuf/message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000297 "protobuf/src/google/protobuf/message.h",
298 "protobuf/src/google/protobuf/metadata.h",
299 "protobuf/src/google/protobuf/reflection.h",
300 "protobuf/src/google/protobuf/reflection_internal.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900301 "protobuf/src/google/protobuf/reflection_ops.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000302 "protobuf/src/google/protobuf/reflection_ops.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900303 "protobuf/src/google/protobuf/service.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000304 "protobuf/src/google/protobuf/service.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900305 "protobuf/src/google/protobuf/source_context.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000306 "protobuf/src/google/protobuf/source_context.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900307 "protobuf/src/google/protobuf/struct.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000308 "protobuf/src/google/protobuf/struct.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900309 "protobuf/src/google/protobuf/stubs/mathlimits.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000310 "protobuf/src/google/protobuf/stubs/mathlimits.h",
311 "protobuf/src/google/protobuf/stubs/mathutil.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900312 "protobuf/src/google/protobuf/stubs/substitute.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000313 "protobuf/src/google/protobuf/stubs/substitute.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900314 "protobuf/src/google/protobuf/text_format.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000315 "protobuf/src/google/protobuf/text_format.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900316 "protobuf/src/google/protobuf/timestamp.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000317 "protobuf/src/google/protobuf/timestamp.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900318 "protobuf/src/google/protobuf/type.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000319 "protobuf/src/google/protobuf/type.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900320 "protobuf/src/google/protobuf/unknown_field_set.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000321 "protobuf/src/google/protobuf/unknown_field_set.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900322 "protobuf/src/google/protobuf/util/field_comparator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000323 "protobuf/src/google/protobuf/util/field_comparator.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900324 "protobuf/src/google/protobuf/util/field_mask_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000325 "protobuf/src/google/protobuf/util/field_mask_util.h",
326 "protobuf/src/google/protobuf/util/internal/constants.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900327 "protobuf/src/google/protobuf/util/internal/datapiece.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000328 "protobuf/src/google/protobuf/util/internal/datapiece.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900329 "protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000330 "protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900331 "protobuf/src/google/protobuf/util/internal/error_listener.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000332 "protobuf/src/google/protobuf/util/internal/error_listener.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900333 "protobuf/src/google/protobuf/util/internal/field_mask_utility.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000334 "protobuf/src/google/protobuf/util/internal/field_mask_utility.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900335 "protobuf/src/google/protobuf/util/internal/json_escaping.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000336 "protobuf/src/google/protobuf/util/internal/json_escaping.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900337 "protobuf/src/google/protobuf/util/internal/json_objectwriter.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000338 "protobuf/src/google/protobuf/util/internal/json_objectwriter.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900339 "protobuf/src/google/protobuf/util/internal/json_stream_parser.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000340 "protobuf/src/google/protobuf/util/internal/json_stream_parser.h",
341 "protobuf/src/google/protobuf/util/internal/location_tracker.h",
342 "protobuf/src/google/protobuf/util/internal/object_location_tracker.h",
343 "protobuf/src/google/protobuf/util/internal/object_source.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900344 "protobuf/src/google/protobuf/util/internal/object_writer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000345 "protobuf/src/google/protobuf/util/internal/object_writer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900346 "protobuf/src/google/protobuf/util/internal/proto_writer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000347 "protobuf/src/google/protobuf/util/internal/proto_writer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900348 "protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000349 "protobuf/src/google/protobuf/util/internal/protostream_objectsource.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900350 "protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000351 "protobuf/src/google/protobuf/util/internal/protostream_objectwriter.h",
352 "protobuf/src/google/protobuf/util/internal/structured_objectwriter.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900353 "protobuf/src/google/protobuf/util/internal/type_info.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000354 "protobuf/src/google/protobuf/util/internal/type_info.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900355 "protobuf/src/google/protobuf/util/internal/type_info_test_helper.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000356 "protobuf/src/google/protobuf/util/internal/type_info_test_helper.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900357 "protobuf/src/google/protobuf/util/internal/utility.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000358 "protobuf/src/google/protobuf/util/internal/utility.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900359 "protobuf/src/google/protobuf/util/json_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000360 "protobuf/src/google/protobuf/util/json_util.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900361 "protobuf/src/google/protobuf/util/message_differencer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000362 "protobuf/src/google/protobuf/util/message_differencer.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900363 "protobuf/src/google/protobuf/util/time_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000364 "protobuf/src/google/protobuf/util/time_util.h",
365 "protobuf/src/google/protobuf/util/type_resolver.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900366 "protobuf/src/google/protobuf/util/type_resolver_util.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000367 "protobuf/src/google/protobuf/util/type_resolver_util.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900368 "protobuf/src/google/protobuf/wire_format.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000369 "protobuf/src/google/protobuf/wire_format.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900370 "protobuf/src/google/protobuf/wrappers.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000371 "protobuf/src/google/protobuf/wrappers.pb.h",
Primiano Tucciae2879e2017-09-27 11:02:09 +0900372 ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000373 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100374 configs += [ ":protobuf_config" ]
375 public_configs = [ ":protobuf_gen_config" ]
Primiano Tucciae2879e2017-09-27 11:02:09 +0900376}
377
Primiano Tuccid0001c32019-09-08 22:45:58 -0700378source_set("protoc_lib") {
379 visibility = _buildtools_visibility
380 deps = [
381 ":protobuf_full",
382 "//gn:default_deps",
383 ]
384 sources = [
385 "protobuf/src/google/protobuf/compiler/code_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000386 "protobuf/src/google/protobuf/compiler/code_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700387 "protobuf/src/google/protobuf/compiler/command_line_interface.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000388 "protobuf/src/google/protobuf/compiler/command_line_interface.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700389 "protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000390 "protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700391 "protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000392 "protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700393 "protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000394 "protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700395 "protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000396 "protobuf/src/google/protobuf/compiler/cpp/cpp_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700397 "protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000398 "protobuf/src/google/protobuf/compiler/cpp/cpp_file.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700399 "protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000400 "protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700401 "protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000402 "protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700403 "protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000404 "protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700405 "protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000406 "protobuf/src/google/protobuf/compiler/cpp/cpp_message.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700407 "protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000408 "protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h",
409 "protobuf/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h",
410 "protobuf/src/google/protobuf/compiler/cpp/cpp_options.h",
411 "protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc",
412 "protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700413 "protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000414 "protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700415 "protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000416 "protobuf/src/google/protobuf/compiler/cpp/cpp_service.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700417 "protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000418 "protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700419 "protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000420 "protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700421 "protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000422 "protobuf/src/google/protobuf/compiler/csharp/csharp_enum.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700423 "protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000424 "protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700425 "protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000426 "protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700427 "protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000428 "protobuf/src/google/protobuf/compiler/csharp/csharp_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700429 "protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000430 "protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700431 "protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000432 "protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700433 "protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000434 "protobuf/src/google/protobuf/compiler/csharp/csharp_message.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700435 "protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000436 "protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.h",
437 "protobuf/src/google/protobuf/compiler/csharp/csharp_options.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700438 "protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000439 "protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700440 "protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000441 "protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700442 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000443 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700444 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000445 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700446 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000447 "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700448 "protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000449 "protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700450 "protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000451 "protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700452 "protobuf/src/google/protobuf/compiler/java/java_context.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000453 "protobuf/src/google/protobuf/compiler/java/java_context.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700454 "protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000455 "protobuf/src/google/protobuf/compiler/java/java_doc_comment.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700456 "protobuf/src/google/protobuf/compiler/java/java_enum.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000457 "protobuf/src/google/protobuf/compiler/java/java_enum.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700458 "protobuf/src/google/protobuf/compiler/java/java_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000459 "protobuf/src/google/protobuf/compiler/java/java_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700460 "protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000461 "protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700462 "protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000463 "protobuf/src/google/protobuf/compiler/java/java_enum_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700464 "protobuf/src/google/protobuf/compiler/java/java_extension.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000465 "protobuf/src/google/protobuf/compiler/java/java_extension.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700466 "protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000467 "protobuf/src/google/protobuf/compiler/java/java_extension_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700468 "protobuf/src/google/protobuf/compiler/java/java_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000469 "protobuf/src/google/protobuf/compiler/java/java_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700470 "protobuf/src/google/protobuf/compiler/java/java_file.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000471 "protobuf/src/google/protobuf/compiler/java/java_file.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700472 "protobuf/src/google/protobuf/compiler/java/java_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000473 "protobuf/src/google/protobuf/compiler/java/java_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700474 "protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000475 "protobuf/src/google/protobuf/compiler/java/java_generator_factory.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700476 "protobuf/src/google/protobuf/compiler/java/java_helpers.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000477 "protobuf/src/google/protobuf/compiler/java/java_helpers.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700478 "protobuf/src/google/protobuf/compiler/java/java_map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000479 "protobuf/src/google/protobuf/compiler/java/java_map_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700480 "protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000481 "protobuf/src/google/protobuf/compiler/java/java_map_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700482 "protobuf/src/google/protobuf/compiler/java/java_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000483 "protobuf/src/google/protobuf/compiler/java/java_message.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700484 "protobuf/src/google/protobuf/compiler/java/java_message_builder.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000485 "protobuf/src/google/protobuf/compiler/java/java_message_builder.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700486 "protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000487 "protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700488 "protobuf/src/google/protobuf/compiler/java/java_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000489 "protobuf/src/google/protobuf/compiler/java/java_message_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700490 "protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000491 "protobuf/src/google/protobuf/compiler/java/java_message_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700492 "protobuf/src/google/protobuf/compiler/java/java_message_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000493 "protobuf/src/google/protobuf/compiler/java/java_message_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700494 "protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000495 "protobuf/src/google/protobuf/compiler/java/java_name_resolver.h",
496 "protobuf/src/google/protobuf/compiler/java/java_options.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700497 "protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000498 "protobuf/src/google/protobuf/compiler/java/java_primitive_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700499 "protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000500 "protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700501 "protobuf/src/google/protobuf/compiler/java/java_service.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000502 "protobuf/src/google/protobuf/compiler/java/java_service.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700503 "protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000504 "protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700505 "protobuf/src/google/protobuf/compiler/java/java_string_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000506 "protobuf/src/google/protobuf/compiler/java/java_string_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700507 "protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000508 "protobuf/src/google/protobuf/compiler/java/java_string_field_lite.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700509 "protobuf/src/google/protobuf/compiler/js/js_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000510 "protobuf/src/google/protobuf/compiler/js/js_generator.h",
511 "protobuf/src/google/protobuf/compiler/js/well_known_types_embed.cc",
512 "protobuf/src/google/protobuf/compiler/js/well_known_types_embed.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700513 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000514 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700515 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000516 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700517 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000518 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700519 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000520 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700521 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000522 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700523 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000524 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700525 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000526 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700527 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000528 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700529 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000530 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700531 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000532 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700533 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000534 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700535 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000536 "protobuf/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h",
537 "protobuf/src/google/protobuf/compiler/php/php_generator.cc",
538 "protobuf/src/google/protobuf/compiler/php/php_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700539 "protobuf/src/google/protobuf/compiler/plugin.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000540 "protobuf/src/google/protobuf/compiler/plugin.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700541 "protobuf/src/google/protobuf/compiler/plugin.pb.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000542 "protobuf/src/google/protobuf/compiler/plugin.pb.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700543 "protobuf/src/google/protobuf/compiler/python/python_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000544 "protobuf/src/google/protobuf/compiler/python/python_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700545 "protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000546 "protobuf/src/google/protobuf/compiler/ruby/ruby_generator.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700547 "protobuf/src/google/protobuf/compiler/subprocess.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000548 "protobuf/src/google/protobuf/compiler/subprocess.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700549 "protobuf/src/google/protobuf/compiler/zip_writer.cc",
Primiano Tuccif550b252019-12-03 11:06:02 +0000550 "protobuf/src/google/protobuf/compiler/zip_writer.h",
Primiano Tuccid0001c32019-09-08 22:45:58 -0700551 ]
552 configs -= [ "//gn/standalone:extra_warnings" ]
553 configs += [ ":protobuf_config" ]
554 public_configs = [ ":protobuf_gen_config" ]
555}
Primiano Tuccifd484232017-10-25 00:15:39 +0100556
Primiano Tuccid0001c32019-09-08 22:45:58 -0700557if (current_toolchain == host_toolchain) {
Primiano Tuccifd484232017-10-25 00:15:39 +0100558 executable("protoc") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100559 visibility = _buildtools_visibility
Oystein Eftevaagdd727e42017-12-05 08:49:55 -0800560 deps = [
561 ":protoc_lib",
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100562 "//gn:default_deps",
Oystein Eftevaagdd727e42017-12-05 08:49:55 -0800563 ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000564 sources = [ "protobuf/src/google/protobuf/compiler/main.cc" ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000565 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tuccifd484232017-10-25 00:15:39 +0100566 }
Primiano Tucciae2879e2017-09-27 11:02:09 +0900567} # host_toolchain
Primiano Tucci0825bc82017-09-28 18:50:23 +0100568
569if (use_custom_libcxx) {
570 # Config applied to both libc++ and libc++abi targets below.
571 config("libc++config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100572 visibility = _buildtools_visibility
Primiano Tucci0825bc82017-09-28 18:50:23 +0100573 defines = [
574 "LIBCXX_BUILDING_LIBCXXABI",
575 "_LIBCXXABI_NO_EXCEPTIONS",
576 "_LIBCPP_OVERRIDABLE_FUNC_VIS=__attribute__((__visibility__(\"default\")))",
577 ]
578 cflags = [
579 "-fPIC",
580 "-fstrict-aliasing",
581 ]
582 }
583
Primiano Tucci7278dea2017-10-31 11:50:32 +0000584 source_set("libunwind") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100585 visibility = _buildtools_visibility
Primiano Tucci7278dea2017-10-31 11:50:32 +0000586 sources = [
587 "libunwind/src/Unwind-EHABI.cpp",
588 "libunwind/src/Unwind-sjlj.c",
589 "libunwind/src/UnwindLevel1-gcc-ext.c",
590 "libunwind/src/UnwindLevel1.c",
591 "libunwind/src/UnwindRegistersRestore.S",
592 "libunwind/src/UnwindRegistersSave.S",
593 "libunwind/src/libunwind.cpp",
594 ]
595 include_dirs = [ "libunwind/include" ]
596 configs -= [
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000597 "//gn/standalone:extra_warnings",
598 "//gn/standalone:no_exceptions",
599 "//gn/standalone:no_rtti",
Primiano Tucci7278dea2017-10-31 11:50:32 +0000600
601 # When building with msan, libunwind itself triggers memory violations
602 # that causes msan to get stuck into an infinite loop. Just don't
603 # instrument libunwind itself.
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000604 "//gn/standalone/sanitizers:sanitizers_cflags",
Primiano Tucci7278dea2017-10-31 11:50:32 +0000605 ]
606 configs += [
607 ":libc++config",
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000608 "//gn/standalone/sanitizers:sanitizer_options_link_helper",
Primiano Tucci7278dea2017-10-31 11:50:32 +0000609 ]
610 }
611
Primiano Tucci0825bc82017-09-28 18:50:23 +0100612 source_set("libc++abi") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100613 visibility = _buildtools_visibility
Primiano Tucci0825bc82017-09-28 18:50:23 +0100614 sources = [
615 "libcxxabi/src/abort_message.cpp",
616 "libcxxabi/src/cxa_aux_runtime.cpp",
617 "libcxxabi/src/cxa_default_handlers.cpp",
618 "libcxxabi/src/cxa_demangle.cpp",
619 "libcxxabi/src/cxa_exception.cpp",
620 "libcxxabi/src/cxa_exception_storage.cpp",
621 "libcxxabi/src/cxa_guard.cpp",
622 "libcxxabi/src/cxa_handlers.cpp",
623 "libcxxabi/src/cxa_personality.cpp",
624 "libcxxabi/src/cxa_unexpected.cpp",
625 "libcxxabi/src/cxa_vector.cpp",
626 "libcxxabi/src/cxa_virtual.cpp",
627 "libcxxabi/src/fallback_malloc.cpp",
628 "libcxxabi/src/private_typeinfo.cpp",
629 "libcxxabi/src/stdlib_exception.cpp",
630 "libcxxabi/src/stdlib_stdexcept.cpp",
631 "libcxxabi/src/stdlib_typeinfo.cpp",
632 ]
633
634 # On linux this seems to introduce an unwanted glibc 2.18 dependency.
635 if (is_android) {
636 sources += [ "libcxxabi/src/cxa_thread_atexit.cpp" ]
637 }
638 configs -= [
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000639 "//gn/standalone:extra_warnings",
640 "//gn/standalone:no_exceptions",
641 "//gn/standalone:no_rtti",
Primiano Tucci5aab7582017-12-07 12:22:03 +0000642 "//gn/standalone:visibility_hidden",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100643 ]
644 configs += [
645 ":libc++config",
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000646 "//gn/standalone/sanitizers:sanitizer_options_link_helper",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100647 ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000648 deps = [ ":libunwind" ]
Primiano Tucci0825bc82017-09-28 18:50:23 +0100649 }
650
Primiano Tucci7278dea2017-10-31 11:50:32 +0000651 if (custom_libcxx_is_static) {
652 libcxx_target_type = "source_set"
653 } else {
654 libcxx_target_type = "shared_library"
655 }
656
657 target(libcxx_target_type, "libc++") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100658 visibility = _buildtools_visibility
659 visibility += [ "../gn/standalone/libc++:*" ]
Primiano Tucci0825bc82017-09-28 18:50:23 +0100660 sources = [
661 "libcxx/src/algorithm.cpp",
662 "libcxx/src/any.cpp",
663 "libcxx/src/bind.cpp",
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000664 "libcxx/src/charconv.cpp",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100665 "libcxx/src/chrono.cpp",
666 "libcxx/src/condition_variable.cpp",
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000667 "libcxx/src/condition_variable_destructor.cpp",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100668 "libcxx/src/debug.cpp",
669 "libcxx/src/exception.cpp",
670 "libcxx/src/functional.cpp",
671 "libcxx/src/future.cpp",
672 "libcxx/src/hash.cpp",
673 "libcxx/src/ios.cpp",
674 "libcxx/src/iostream.cpp",
675 "libcxx/src/locale.cpp",
676 "libcxx/src/memory.cpp",
677 "libcxx/src/mutex.cpp",
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000678 "libcxx/src/mutex_destructor.cpp",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100679 "libcxx/src/new.cpp",
680 "libcxx/src/optional.cpp",
681 "libcxx/src/random.cpp",
682 "libcxx/src/regex.cpp",
683 "libcxx/src/shared_mutex.cpp",
684 "libcxx/src/stdexcept.cpp",
685 "libcxx/src/string.cpp",
686 "libcxx/src/strstream.cpp",
687 "libcxx/src/system_error.cpp",
688 "libcxx/src/thread.cpp",
689 "libcxx/src/typeinfo.cpp",
690 "libcxx/src/utility.cpp",
691 "libcxx/src/valarray.cpp",
692 "libcxx/src/variant.cpp",
Primiano Tuccic2eb5102018-05-15 10:40:01 +0100693 "libcxx/src/vector.cpp",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100694 ]
695 configs -= [
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000696 "//gn/standalone:extra_warnings",
697 "//gn/standalone:no_exceptions",
698 "//gn/standalone:no_rtti",
Primiano Tucci5aab7582017-12-07 12:22:03 +0000699 "//gn/standalone:visibility_hidden",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100700 ]
701 configs += [
702 ":libc++config",
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000703 "//gn/standalone/sanitizers:sanitizer_options_link_helper",
Primiano Tucci0825bc82017-09-28 18:50:23 +0100704 ]
705 defines = [ "_LIBCPP_BUILDING_LIBRARY" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000706 if ((is_linux || is_android) && (is_asan || is_tsan || is_msan)) {
707 # In {a,t,m}san configurations, operator new and operator delete will be
708 # provided by the sanitizer runtime library. Since libc++ defines these
709 # symbols with weak linkage, and the *san runtime uses strong linkage, it
710 # should technically be OK to omit this, but it's added to be explicit.
711 defines += [ "_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS" ]
712 }
713 deps = [ ":libc++abi" ]
Primiano Tucci0825bc82017-09-28 18:50:23 +0100714 }
715} # if (use_custom_libcxx)
Hector Dearman88a10112017-10-12 11:07:10 +0100716
717config("benchmark_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100718 visibility = _buildtools_visibility
Primiano Tucci2a29ac72017-10-24 17:47:19 +0100719 include_dirs = [ "benchmark/include" ]
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100720 configs = [ ":test_warning_suppressions" ]
Hector Dearman88a10112017-10-12 11:07:10 +0100721}
722
723source_set("benchmark") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100724 visibility = _buildtools_visibility
Hector Dearman88a10112017-10-12 11:07:10 +0100725 testonly = true
726 sources = [
727 "benchmark/include/benchmark/benchmark.h",
728 "benchmark/include/benchmark/benchmark_api.h",
729 "benchmark/include/benchmark/reporter.h",
730 "benchmark/src/arraysize.h",
731 "benchmark/src/benchmark.cc",
732 "benchmark/src/benchmark_api_internal.h",
733 "benchmark/src/benchmark_register.cc",
734 "benchmark/src/check.h",
735 "benchmark/src/colorprint.cc",
736 "benchmark/src/colorprint.h",
737 "benchmark/src/commandlineflags.cc",
738 "benchmark/src/commandlineflags.h",
739 "benchmark/src/complexity.cc",
740 "benchmark/src/complexity.h",
741 "benchmark/src/console_reporter.cc",
742 "benchmark/src/counter.cc",
743 "benchmark/src/counter.h",
744 "benchmark/src/csv_reporter.cc",
745 "benchmark/src/cycleclock.h",
746 "benchmark/src/internal_macros.h",
747 "benchmark/src/json_reporter.cc",
748 "benchmark/src/log.h",
749 "benchmark/src/mutex.h",
750 "benchmark/src/re.h",
751 "benchmark/src/reporter.cc",
752 "benchmark/src/sleep.cc",
753 "benchmark/src/sleep.h",
Lalit Magantic99d93c2018-03-22 15:09:30 +0000754 "benchmark/src/statistics.cc",
755 "benchmark/src/statistics.h",
Hector Dearman88a10112017-10-12 11:07:10 +0100756 "benchmark/src/string_util.cc",
757 "benchmark/src/string_util.h",
758 "benchmark/src/sysinfo.cc",
759 "benchmark/src/sysinfo.h",
760 "benchmark/src/timers.cc",
761 "benchmark/src/timers.h",
762 ]
763 defines = [ "HAVE_POSIX_REGEX" ]
764 public_configs = [ ":benchmark_config" ]
765 all_dependent_configs = [ ":benchmark_config" ]
Primiano Tucci7a40e4d2017-12-06 09:51:09 +0000766 configs -= [ "//gn/standalone:extra_warnings" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000767 deps = [ "//gn:default_deps" ]
Hector Dearman88a10112017-10-12 11:07:10 +0100768}
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200769
770# On Linux/Android use libbacktrace in debug builds for better stacktraces.
771if (is_linux || is_android) {
772 config("libbacktrace_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100773 visibility = _buildtools_visibility
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200774 include_dirs = [
775 "libbacktrace_config",
776 "libbacktrace",
777 ]
778 cflags = [
Primiano Tucci3cbb10a2018-04-10 17:52:40 +0100779 # We force include this config file because "config.h" is too generic as a
780 # file name and on some platforms #include "config.h" ends up colliding
781 # importing some other project's config.h.
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200782 "-include",
783 rebase_path("libbacktrace_config/config.h", root_build_dir),
784 ]
785 }
786
787 source_set("libbacktrace") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100788 visibility = _buildtools_visibility
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200789 sources = [
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200790 "libbacktrace/dwarf.c",
791 "libbacktrace/elf.c",
792 "libbacktrace/fileline.c",
793 "libbacktrace/mmap.c",
794 "libbacktrace/mmapio.c",
795 "libbacktrace/posix.c",
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200796 "libbacktrace/sort.c",
797 "libbacktrace/state.c",
798 ]
799 configs -= [ "//gn/standalone:extra_warnings" ]
800 public_configs = [ ":libbacktrace_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000801 deps = [ "//gn:default_deps" ]
Primiano Tucci38faa6f2018-04-01 20:12:08 +0200802 }
803}
Lalit Magantib123f262018-05-22 14:05:03 +0100804
805config("sqlite_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100806 visibility = _buildtools_visibility
Lalit Magantib123f262018-05-22 14:05:03 +0100807 include_dirs = [ "sqlite" ]
808 cflags = [
809 "-DSQLITE_THREADSAFE=0",
810 "-DQLITE_DEFAULT_MEMSTATUS=0",
811 "-DSQLITE_LIKE_DOESNT_MATCH_BLOBS",
Lalit Magantib123f262018-05-22 14:05:03 +0100812 "-DSQLITE_OMIT_DEPRECATED",
813 "-DSQLITE_OMIT_SHARED_CACHE",
814 "-DHAVE_USLEEP",
815 "-DHAVE_UTIME",
816 "-DSQLITE_BYTEORDER=1234",
817 "-DSQLITE_DEFAULT_AUTOVACUUM=0",
818 "-DSQLITE_DEFAULT_MMAP_SIZE=0",
819 "-DSQLITE_CORE",
Lalit Maganti8d31c732018-06-21 14:23:04 +0100820 "-DSQLITE_TEMP_STORE=3",
Lalit Magantic6347f02018-06-25 14:03:46 +0100821 "-DSQLITE_OMIT_LOAD_EXTENSION",
Hector Dearman7af33572018-09-19 17:42:25 +0100822 "-DSQLITE_OMIT_RANDOMNESS",
Lalit Maganti1e5630e2020-01-29 12:34:14 +0000823 "-DSQLITE_OMIT_AUTOINIT",
Lalit Magantie1fdf552020-02-06 17:20:16 +0000824 "-DSQLITE_ENABLE_JSON1",
Lalit Magantib123f262018-05-22 14:05:03 +0100825 ]
826}
827
828source_set("sqlite") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100829 visibility = _buildtools_visibility
Lalit Magantib123f262018-05-22 14:05:03 +0100830 sources = [
831 "sqlite/sqlite3.c",
832 "sqlite/sqlite3.h",
833 "sqlite/sqlite3ext.h",
Ioannis Ilkos178535e2018-11-05 17:32:45 +0000834 "sqlite_src/ext/misc/percentile.c",
Lalit Magantib123f262018-05-22 14:05:03 +0100835 ]
836 configs -= [ "//gn/standalone:extra_warnings" ]
837 public_configs = [ ":sqlite_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000838 deps = [ "//gn:default_deps" ]
Lalit Magantib123f262018-05-22 14:05:03 +0100839}
840
841source_set("sqlite_shell") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100842 visibility = _buildtools_visibility
Lalit Magantib123f262018-05-22 14:05:03 +0100843 testonly = true
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000844 sources = [ "sqlite/shell.c" ]
Lalit Magantib123f262018-05-22 14:05:03 +0100845 configs -= [ "//gn/standalone:extra_warnings" ]
846 deps = [
847 ":sqlite",
Florian Mayera85b8fa2019-07-11 11:00:48 +0100848 "//gn:default_deps",
Lalit Magantib123f262018-05-22 14:05:03 +0100849 ]
850}
Primiano Tucci0d72a312018-08-07 14:42:45 +0100851
Florian Mayer475bd7e2018-08-07 20:04:03 +0100852source_set("lzma") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100853 visibility = _buildtools_visibility
Florian Mayer475bd7e2018-08-07 20:04:03 +0100854 defines = [ "_7ZIP_ST" ]
855 sources = [
856 "lzma/C/7zAlloc.c",
857 "lzma/C/7zArcIn.c",
858 "lzma/C/7zBuf.c",
859 "lzma/C/7zBuf2.c",
860 "lzma/C/7zCrc.c",
861 "lzma/C/7zCrcOpt.c",
862 "lzma/C/7zDec.c",
863 "lzma/C/7zFile.c",
864 "lzma/C/7zStream.c",
865 "lzma/C/Aes.c",
866 "lzma/C/AesOpt.c",
867 "lzma/C/Alloc.c",
868 "lzma/C/Bcj2.c",
869 "lzma/C/Bra.c",
870 "lzma/C/Bra86.c",
871 "lzma/C/BraIA64.c",
872 "lzma/C/CpuArch.c",
873 "lzma/C/Delta.c",
874 "lzma/C/LzFind.c",
875 "lzma/C/Lzma2Dec.c",
876 "lzma/C/Lzma2Enc.c",
877 "lzma/C/Lzma86Dec.c",
878 "lzma/C/Lzma86Enc.c",
879 "lzma/C/LzmaDec.c",
880 "lzma/C/LzmaEnc.c",
881 "lzma/C/LzmaLib.c",
882 "lzma/C/Ppmd7.c",
883 "lzma/C/Ppmd7Dec.c",
884 "lzma/C/Ppmd7Enc.c",
885 "lzma/C/Sha256.c",
886 "lzma/C/Sort.c",
887 "lzma/C/Xz.c",
888 "lzma/C/XzCrc64.c",
889 "lzma/C/XzCrc64Opt.c",
890 "lzma/C/XzDec.c",
891 "lzma/C/XzEnc.c",
892 "lzma/C/XzIn.c",
893 ]
894 configs -= [ "//gn/standalone:extra_warnings" ]
895 cflags = [
896 "-Wno-empty-body",
897 "-Wno-enum-conversion",
898 ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000899 deps = [ "//gn:default_deps" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +0100900}
Florian Mayera2fae262018-08-31 12:10:01 -0700901
Hector Dearmane0b993f2019-05-24 18:48:16 +0100902source_set("zlib") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100903 visibility = _buildtools_visibility
Hector Dearmane0b993f2019-05-24 18:48:16 +0100904 sources = [
905 "zlib/src/adler32.c",
906 "zlib/src/compress.c",
907 "zlib/src/crc32.c",
908 "zlib/src/deflate.c",
909 "zlib/src/gzclose.c",
910 "zlib/src/gzlib.c",
911 "zlib/src/gzread.c",
912 "zlib/src/gzwrite.c",
913 "zlib/src/infback.c",
914 "zlib/src/inffast.c",
915 "zlib/src/inflate.c",
916 "zlib/src/inftrees.c",
917 "zlib/src/trees.c",
918 "zlib/src/uncompr.c",
919 "zlib/src/zutil.c",
920 ]
921 configs -= [ "//gn/standalone:extra_warnings" ]
922 cflags = []
923 public_configs = [ ":zlib_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +0000924 deps = [ "//gn:default_deps" ]
Hector Dearmane0b993f2019-05-24 18:48:16 +0100925}
926
927config("zlib_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100928 visibility = _buildtools_visibility
Primiano Tucci225a4e62019-06-06 11:13:57 +0100929 defines = [ "HAVE_HIDDEN" ]
Hector Dearman554627f2019-06-04 17:58:22 +0100930 cflags = [
931 # Using -isystem instead of include_dirs (-I), so we don't need to suppress
932 # warnings coming from third-party headers. Doing so would mask warnings in
933 # our own code.
934 "-isystem",
935 rebase_path("zlib/src", root_build_dir),
936 ]
Hector Dearmane0b993f2019-05-24 18:48:16 +0100937}
938
Florian Mayer475bd7e2018-08-07 20:04:03 +0100939source_set("libunwindstack") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +0100940 visibility = _buildtools_visibility
Florian Mayer475bd7e2018-08-07 20:04:03 +0100941 include_dirs = [
Florian Mayerf8335662018-08-08 11:30:32 +0100942 "android-core/libunwindstack/include",
943 "android-core/libunwindstack",
944 "android-core/base/include",
945 "android-core/liblog/include",
946 "android-core/libprocinfo/include",
947 "android-core/include",
Florian Mayer475bd7e2018-08-07 20:04:03 +0100948 "lzma/C",
949 ]
950 deps = [
951 ":lzma",
Florian Mayera85b8fa2019-07-11 11:00:48 +0100952 "//gn:default_deps",
Florian Mayer475bd7e2018-08-07 20:04:03 +0100953 ]
Florian Mayer475bd7e2018-08-07 20:04:03 +0100954 sources = [
Florian Mayerf8335662018-08-08 11:30:32 +0100955 "android-core/base/file.cpp",
Florian Mayerce11bea2020-01-23 19:47:58 +0000956 "android-core/base/liblog_symbols.cpp",
Florian Mayerf8335662018-08-08 11:30:32 +0100957 "android-core/base/logging.cpp",
958 "android-core/base/stringprintf.cpp",
959 "android-core/base/strings.cpp",
960 "android-core/base/threads.cpp",
Florian Mayerce11bea2020-01-23 19:47:58 +0000961 "android-core/liblog/fake_log_device.cpp",
962 "android-core/liblog/logger_write.cpp",
Florian Mayerf8335662018-08-08 11:30:32 +0100963 "android-core/libunwindstack/ArmExidx.cpp",
964 "android-core/libunwindstack/DwarfCfa.cpp",
965 "android-core/libunwindstack/DwarfEhFrameWithHdr.cpp",
966 "android-core/libunwindstack/DwarfMemory.cpp",
967 "android-core/libunwindstack/DwarfOp.cpp",
968 "android-core/libunwindstack/DwarfSection.cpp",
969 "android-core/libunwindstack/Elf.cpp",
970 "android-core/libunwindstack/ElfInterface.cpp",
971 "android-core/libunwindstack/ElfInterfaceArm.cpp",
Florian Mayer86120f62018-10-23 15:19:46 +0100972 "android-core/libunwindstack/Global.cpp",
Florian Mayerf8335662018-08-08 11:30:32 +0100973 "android-core/libunwindstack/JitDebug.cpp",
974 "android-core/libunwindstack/LocalUnwinder.cpp",
975 "android-core/libunwindstack/Log.cpp",
976 "android-core/libunwindstack/MapInfo.cpp",
977 "android-core/libunwindstack/Maps.cpp",
978 "android-core/libunwindstack/Memory.cpp",
979 "android-core/libunwindstack/Regs.cpp",
980 "android-core/libunwindstack/RegsArm.cpp",
981 "android-core/libunwindstack/RegsArm64.cpp",
982 "android-core/libunwindstack/RegsMips.cpp",
983 "android-core/libunwindstack/RegsMips64.cpp",
984 "android-core/libunwindstack/RegsX86.cpp",
985 "android-core/libunwindstack/RegsX86_64.cpp",
986 "android-core/libunwindstack/Symbols.cpp",
987 "android-core/libunwindstack/Unwinder.cpp",
Florian Mayer475bd7e2018-08-07 20:04:03 +0100988 ]
989 if (current_cpu == "x86") {
Florian Mayerf8335662018-08-08 11:30:32 +0100990 sources += [ "android-core/libunwindstack/AsmGetRegsX86.S" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +0100991 } else if (current_cpu == "x64") {
Florian Mayerf8335662018-08-08 11:30:32 +0100992 sources += [ "android-core/libunwindstack/AsmGetRegsX86_64.S" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +0100993 }
994 configs -= [
995 "//gn/standalone:extra_warnings",
996 "//gn/standalone:c++11",
Florian Mayera2fae262018-08-31 12:10:01 -0700997 "//gn/standalone:visibility_hidden",
Florian Mayer475bd7e2018-08-07 20:04:03 +0100998 ]
Florian Mayerce11bea2020-01-23 19:47:58 +0000999 cflags = [ "-DFAKE_LOG_DEVICE=1" ]
Florian Mayer475bd7e2018-08-07 20:04:03 +01001000 configs += [ "//gn/standalone:c++17" ]
1001 public_configs = [ ":libunwindstack_config" ]
1002}
1003
Ryan Savitski56bc0c62020-01-27 13:50:02 +00001004config("bionic_kernel_uapi_headers") {
1005 visibility = _buildtools_visibility
1006 cflags = [
1007 "-isystem",
1008 rebase_path("bionic/libc/kernel", root_build_dir),
1009 ]
1010}
1011
Primiano Tucci0d72a312018-08-07 14:42:45 +01001012config("jsoncpp_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +01001013 visibility = _buildtools_visibility
Primiano Tucci0d72a312018-08-07 14:42:45 +01001014 cflags = [
1015 "-DJSON_USE_EXCEPTION=0",
1016
1017 # Using -isystem instead of include_dirs (-I), so we don't need to suppress
Florian Mayerbda0c442018-09-07 10:53:55 +01001018 # warnings coming from third-party headers. Doing so would mask warnings in
Primiano Tucci0d72a312018-08-07 14:42:45 +01001019 # our own code.
1020 "-isystem",
1021 rebase_path("jsoncpp/include", root_build_dir),
1022 ]
1023}
1024
1025source_set("jsoncpp") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +01001026 visibility = _buildtools_visibility
Primiano Tucci0d72a312018-08-07 14:42:45 +01001027 sources = [
1028 "jsoncpp/src/lib_json/json_reader.cpp",
1029 "jsoncpp/src/lib_json/json_value.cpp",
1030 "jsoncpp/src/lib_json/json_writer.cpp",
1031 ]
1032 configs -= [ "//gn/standalone:extra_warnings" ]
1033 public_configs = [ ":jsoncpp_config" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +00001034 deps = [ "//gn:default_deps" ]
Primiano Tucci0d72a312018-08-07 14:42:45 +01001035}
Hector Dearmane44ad452018-09-21 11:51:57 +01001036
1037config("linenoise_config") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +01001038 visibility = _buildtools_visibility
Hector Dearmane44ad452018-09-21 11:51:57 +01001039 cflags = [
1040 # Using -isystem instead of include_dirs (-I), so we don't need to suppress
1041 # warnings coming from third-party headers. Doing so would mask warnings in
1042 # our own code.
1043 "-isystem",
1044 rebase_path("linenoise", root_build_dir),
1045 ]
1046}
1047
1048source_set("linenoise") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +01001049 visibility = _buildtools_visibility
Hector Dearmane44ad452018-09-21 11:51:57 +01001050 sources = [
1051 "linenoise/linenoise.c",
1052 "linenoise/linenoise.h",
1053 ]
1054 configs -= [ "//gn/standalone:extra_warnings" ]
1055 public_configs = [ ":linenoise_config" ]
Lalit Magantiedace412019-06-18 13:28:28 +01001056 cflags = [ "-Wno-tautological-unsigned-zero-compare" ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +00001057 deps = [ "//gn:default_deps" ]
Hector Dearmane44ad452018-09-21 11:51:57 +01001058}
Primiano Tuccia65497e2018-09-26 19:53:58 +01001059
Primiano Tucci780deea2018-10-11 09:28:05 +01001060if (use_libfuzzer) {
1061 source_set("libfuzzer") {
Primiano Tucci13ae72f2019-06-06 10:53:02 +01001062 visibility = _buildtools_visibility
Primiano Tucci780deea2018-10-11 09:28:05 +01001063 configs -= [
1064 "//gn/standalone:extra_warnings",
1065 "//gn/standalone/sanitizers:sanitizers_cflags",
1066 ]
1067 sources = [
1068 "libfuzzer/FuzzerCrossOver.cpp",
1069 "libfuzzer/FuzzerDataFlowTrace.cpp",
1070 "libfuzzer/FuzzerDriver.cpp",
1071 "libfuzzer/FuzzerExtFunctionsDlsym.cpp",
1072 "libfuzzer/FuzzerExtFunctionsWeak.cpp",
Florian Mayera85b8fa2019-07-11 11:00:48 +01001073 "libfuzzer/FuzzerExtFunctionsWindows.cpp",
Primiano Tucci780deea2018-10-11 09:28:05 +01001074 "libfuzzer/FuzzerExtraCounters.cpp",
Florian Mayera85b8fa2019-07-11 11:00:48 +01001075 "libfuzzer/FuzzerFork.cpp",
Primiano Tucci780deea2018-10-11 09:28:05 +01001076 "libfuzzer/FuzzerIO.cpp",
1077 "libfuzzer/FuzzerIOPosix.cpp",
1078 "libfuzzer/FuzzerIOWindows.cpp",
1079 "libfuzzer/FuzzerLoop.cpp",
1080 "libfuzzer/FuzzerMain.cpp",
1081 "libfuzzer/FuzzerMerge.cpp",
1082 "libfuzzer/FuzzerMutate.cpp",
1083 "libfuzzer/FuzzerSHA1.cpp",
Primiano Tucci780deea2018-10-11 09:28:05 +01001084 "libfuzzer/FuzzerTracePC.cpp",
1085 "libfuzzer/FuzzerUtil.cpp",
1086 "libfuzzer/FuzzerUtilDarwin.cpp",
1087 "libfuzzer/FuzzerUtilFuchsia.cpp",
1088 "libfuzzer/FuzzerUtilLinux.cpp",
1089 "libfuzzer/FuzzerUtilPosix.cpp",
1090 "libfuzzer/FuzzerUtilWindows.cpp",
1091 ]
Primiano Tucci5e2dbac2020-01-27 10:35:27 +00001092 deps = [ "//gn:default_deps" ]
Primiano Tucci780deea2018-10-11 09:28:05 +01001093 }
Primiano Tuccia65497e2018-09-26 19:53:58 +01001094}