Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 1 | # Copyright (C) 2017 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 15 | import("//gn/standalone/libc++/libc++.gni") |
Florian Mayer | a2fae26 | 2018-08-31 12:10:01 -0700 | [diff] [blame] | 16 | import("../gn/perfetto.gni") |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 17 | |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 18 | # Used to suppress warnings coming from googletest macros expansions. |
| 19 | config("test_warning_suppressions") { |
| 20 | cflags = [ |
| 21 | "-Wno-unknown-warning-option", |
| 22 | "-Wno-global-constructors", |
| 23 | "-Wno-covered-switch-default", |
| 24 | "-Wno-used-but-marked-unused", |
| 25 | "-Wno-covered-switch-default", |
| 26 | "-Wno-global-constructors", |
| 27 | "-Wno-used-but-marked-unused", |
| 28 | "-Wno-inconsistent-missing-override", |
| 29 | "-Wno-unused-member-function", |
| 30 | "-Wno-zero-as-null-pointer-constant", |
| 31 | "-Wno-weak-vtables", |
| 32 | ] |
| 33 | } |
| 34 | |
Primiano Tucci | 2a29ac7 | 2017-10-24 17:47:19 +0100 | [diff] [blame] | 35 | # Mimimal config to be used in production (i.e. non-test) targets. This is |
| 36 | # really just to allowing include "gtest/gtest_prod.h" for the FRIEND_TEST macro |
| 37 | # and avoid to pull in warning suppressions that are not really necessary for |
| 38 | # production code. |
| 39 | config("googletest_prod_config") { |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 40 | cflags = [ |
| 41 | # Using -isystem instead of include_dirs (-I), so we don't need to suppress |
Florian Mayer | bda0c44 | 2018-09-07 10:53:55 +0100 | [diff] [blame] | 42 | # warnings coming from third-party headers. Doing so would mask warnings in |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 43 | # our own code. |
| 44 | "-isystem", |
| 45 | rebase_path("googletest/googletest/include", root_build_dir), |
| 46 | ] |
Primiano Tucci | 2a29ac7 | 2017-10-24 17:47:19 +0100 | [diff] [blame] | 47 | } |
| 48 | |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 49 | config("libunwindstack_config") { |
| 50 | cflags = [ |
| 51 | # Using -isystem instead of include_dirs (-I), so we don't need to suppress |
Florian Mayer | f833566 | 2018-08-08 11:30:32 +0100 | [diff] [blame] | 52 | # warnings coming from libunwindstack headers. Doing so would mask warnings |
| 53 | # in our own code. |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 54 | "-isystem", |
Florian Mayer | f833566 | 2018-08-08 11:30:32 +0100 | [diff] [blame] | 55 | rebase_path("android-core/libunwindstack/include", root_build_dir), |
Florian Mayer | b64d6b1 | 2018-08-30 10:46:30 -0700 | [diff] [blame] | 56 | "-isystem", |
| 57 | rebase_path("android-core/libprocinfo/include", root_build_dir), |
| 58 | "-isystem", |
| 59 | rebase_path("android-core/base/include", root_build_dir), |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 60 | ] |
Florian Mayer | b64d6b1 | 2018-08-30 10:46:30 -0700 | [diff] [blame] | 61 | if (is_android) { |
| 62 | cflags += [ |
| 63 | "-isystem", |
| 64 | rebase_path("bionic/libc/include", root_build_dir), |
| 65 | ] |
| 66 | } |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 67 | } |
| 68 | |
Primiano Tucci | 2a29ac7 | 2017-10-24 17:47:19 +0100 | [diff] [blame] | 69 | # Config to include gtest.h in test targets. |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 70 | config("googletest_config") { |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 71 | defines = [ "GTEST_LANG_CXX11=1" ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 72 | cflags = [ |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 73 | # Using -isystem instead of include_dirs (-I), so we don't need to suppress |
Florian Mayer | bda0c44 | 2018-09-07 10:53:55 +0100 | [diff] [blame] | 74 | # warnings coming from third-party headers. Doing so would mask warnings in |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 75 | # our own code. |
| 76 | "-isystem", |
| 77 | rebase_path("googletest/googletest/include", root_build_dir), |
| 78 | "-isystem", |
| 79 | rebase_path("googletest/googlemock/include", root_build_dir), |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 80 | ] |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 81 | configs = [ ":test_warning_suppressions" ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | source_set("gtest") { |
| 85 | testonly = true |
| 86 | include_dirs = [ "googletest/googletest" ] |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 87 | configs -= [ "//gn/standalone:extra_warnings" ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 88 | public_configs = [ ":googletest_config" ] |
| 89 | all_dependent_configs = [ ":googletest_config" ] |
| 90 | sources = [ |
| 91 | "googletest/googletest/src/gtest-all.cc", |
| 92 | ] |
| 93 | } |
| 94 | |
| 95 | source_set("gtest_main") { |
| 96 | testonly = true |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 97 | configs -= [ "//gn/standalone:extra_warnings" ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 98 | configs += [ ":googletest_config" ] |
| 99 | sources = [ |
| 100 | "googletest/googletest/src/gtest_main.cc", |
| 101 | ] |
| 102 | } |
| 103 | |
| 104 | source_set("gmock") { |
| 105 | testonly = true |
| 106 | include_dirs = [ "googletest/googlemock" ] |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 107 | configs -= [ "//gn/standalone:extra_warnings" ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 108 | public_configs = [ ":googletest_config" ] |
| 109 | all_dependent_configs = [ ":googletest_config" ] |
| 110 | sources = [ |
| 111 | "googletest/googlemock/src/gmock-all.cc", |
| 112 | ] |
| 113 | } |
| 114 | |
Primiano Tucci | fd48423 | 2017-10-25 00:15:39 +0100 | [diff] [blame] | 115 | # This config is applied to the autogenerated .pb.{cc,h} files in |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 116 | # //gn/standalone/proto_library.gni. This config is propagated up to the source sets |
Primiano Tucci | fd48423 | 2017-10-25 00:15:39 +0100 | [diff] [blame] | 117 | # that depend on generated proto headers. Therefore this should stay as lean and |
| 118 | # clean as possible in terms of -W-no* suppressions. Thankfully the |
| 119 | # autogenerated .pb.h headers violate less warnings than the libprotobuf_* |
| 120 | # library itself. |
| 121 | config("protobuf_gen_config") { |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 122 | defines = [ |
| 123 | "GOOGLE_PROTOBUF_NO_RTTI", |
| 124 | "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 125 | ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 126 | cflags = [ |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 127 | # Using -isystem instead of include_dirs (-I), so we don't need to suppress |
| 128 | # warnings coming from libprotobuf headers. Doing so would mask warnings in |
| 129 | # our own code. |
| 130 | "-isystem", |
| 131 | rebase_path("protobuf/src", root_build_dir), |
| 132 | "-Wno-unknown-warning-option", |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 133 | "-Wno-deprecated", |
Primiano Tucci | d7d1be0 | 2017-10-30 17:41:34 +0000 | [diff] [blame] | 134 | "-Wno-undef", |
Primiano Tucci | fd48423 | 2017-10-25 00:15:39 +0100 | [diff] [blame] | 135 | "-Wno-zero-as-null-pointer-constant", |
| 136 | ] |
Primiano Tucci | fd48423 | 2017-10-25 00:15:39 +0100 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | # Configuration used to build libprotobuf_* and the protoc compiler. |
| 140 | config("protobuf_config") { |
| 141 | # Apply the lighter supressions and macro definitions from above. |
| 142 | configs = [ ":protobuf_gen_config" ] |
| 143 | |
Primiano Tucci | fd48423 | 2017-10-25 00:15:39 +0100 | [diff] [blame] | 144 | defines = [ "HAVE_PTHREAD=1" ] |
Hector Dearman | edb3beb | 2017-10-09 17:53:36 +0100 | [diff] [blame] | 145 | if (is_clang) { |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 146 | cflags = [ |
| 147 | "-Wno-unknown-warning-option", |
Primiano Tucci | b60d4b0 | 2017-11-10 11:03:00 +0000 | [diff] [blame] | 148 | "-Wno-enum-compare-switch", |
Primiano Tucci | b60d4b0 | 2017-11-10 11:03:00 +0000 | [diff] [blame] | 149 | "-Wno-user-defined-warnings", |
Florian Mayer | aa5316b | 2018-08-20 17:45:12 -0700 | [diff] [blame] | 150 | "-Wno-tautological-constant-compare", |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 151 | ] |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | source_set("protobuf_lite") { |
| 156 | sources = [ |
| 157 | "protobuf/src/google/protobuf/arena.cc", |
| 158 | "protobuf/src/google/protobuf/arenastring.cc", |
| 159 | "protobuf/src/google/protobuf/extension_set.cc", |
| 160 | "protobuf/src/google/protobuf/generated_message_util.cc", |
| 161 | "protobuf/src/google/protobuf/io/coded_stream.cc", |
| 162 | "protobuf/src/google/protobuf/io/zero_copy_stream.cc", |
| 163 | "protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", |
| 164 | "protobuf/src/google/protobuf/message_lite.cc", |
| 165 | "protobuf/src/google/protobuf/repeated_field.cc", |
| 166 | "protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc", |
| 167 | "protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc", |
| 168 | "protobuf/src/google/protobuf/stubs/bytestream.cc", |
| 169 | "protobuf/src/google/protobuf/stubs/common.cc", |
| 170 | "protobuf/src/google/protobuf/stubs/int128.cc", |
| 171 | "protobuf/src/google/protobuf/stubs/once.cc", |
| 172 | "protobuf/src/google/protobuf/stubs/status.cc", |
| 173 | "protobuf/src/google/protobuf/stubs/statusor.cc", |
| 174 | "protobuf/src/google/protobuf/stubs/stringpiece.cc", |
| 175 | "protobuf/src/google/protobuf/stubs/stringprintf.cc", |
| 176 | "protobuf/src/google/protobuf/stubs/structurally_valid.cc", |
| 177 | "protobuf/src/google/protobuf/stubs/strutil.cc", |
| 178 | "protobuf/src/google/protobuf/stubs/time.cc", |
| 179 | "protobuf/src/google/protobuf/wire_format_lite.cc", |
| 180 | ] |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 181 | configs -= [ "//gn/standalone:extra_warnings" ] |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 182 | configs += [ ":protobuf_config" ] |
| 183 | public_configs = [ ":protobuf_gen_config" ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 184 | } |
| 185 | |
| 186 | source_set("protobuf_full") { |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 187 | deps = [ |
| 188 | ":protobuf_lite", |
| 189 | ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 190 | sources = [ |
| 191 | "protobuf/src/google/protobuf/any.cc", |
| 192 | "protobuf/src/google/protobuf/any.pb.cc", |
| 193 | "protobuf/src/google/protobuf/api.pb.cc", |
| 194 | "protobuf/src/google/protobuf/compiler/importer.cc", |
| 195 | "protobuf/src/google/protobuf/compiler/parser.cc", |
| 196 | "protobuf/src/google/protobuf/descriptor.cc", |
| 197 | "protobuf/src/google/protobuf/descriptor.pb.cc", |
| 198 | "protobuf/src/google/protobuf/descriptor_database.cc", |
| 199 | "protobuf/src/google/protobuf/duration.pb.cc", |
| 200 | "protobuf/src/google/protobuf/dynamic_message.cc", |
| 201 | "protobuf/src/google/protobuf/empty.pb.cc", |
| 202 | "protobuf/src/google/protobuf/extension_set_heavy.cc", |
| 203 | "protobuf/src/google/protobuf/field_mask.pb.cc", |
| 204 | "protobuf/src/google/protobuf/generated_message_reflection.cc", |
| 205 | "protobuf/src/google/protobuf/io/gzip_stream.cc", |
| 206 | "protobuf/src/google/protobuf/io/printer.cc", |
| 207 | "protobuf/src/google/protobuf/io/strtod.cc", |
| 208 | "protobuf/src/google/protobuf/io/tokenizer.cc", |
| 209 | "protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc", |
| 210 | "protobuf/src/google/protobuf/map_field.cc", |
| 211 | "protobuf/src/google/protobuf/message.cc", |
| 212 | "protobuf/src/google/protobuf/reflection_ops.cc", |
| 213 | "protobuf/src/google/protobuf/service.cc", |
| 214 | "protobuf/src/google/protobuf/source_context.pb.cc", |
| 215 | "protobuf/src/google/protobuf/struct.pb.cc", |
| 216 | "protobuf/src/google/protobuf/stubs/mathlimits.cc", |
| 217 | "protobuf/src/google/protobuf/stubs/substitute.cc", |
| 218 | "protobuf/src/google/protobuf/text_format.cc", |
| 219 | "protobuf/src/google/protobuf/timestamp.pb.cc", |
| 220 | "protobuf/src/google/protobuf/type.pb.cc", |
| 221 | "protobuf/src/google/protobuf/unknown_field_set.cc", |
| 222 | "protobuf/src/google/protobuf/util/field_comparator.cc", |
| 223 | "protobuf/src/google/protobuf/util/field_mask_util.cc", |
| 224 | "protobuf/src/google/protobuf/util/internal/datapiece.cc", |
| 225 | "protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc", |
| 226 | "protobuf/src/google/protobuf/util/internal/error_listener.cc", |
| 227 | "protobuf/src/google/protobuf/util/internal/field_mask_utility.cc", |
| 228 | "protobuf/src/google/protobuf/util/internal/json_escaping.cc", |
| 229 | "protobuf/src/google/protobuf/util/internal/json_objectwriter.cc", |
| 230 | "protobuf/src/google/protobuf/util/internal/json_stream_parser.cc", |
| 231 | "protobuf/src/google/protobuf/util/internal/object_writer.cc", |
| 232 | "protobuf/src/google/protobuf/util/internal/proto_writer.cc", |
| 233 | "protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc", |
| 234 | "protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc", |
| 235 | "protobuf/src/google/protobuf/util/internal/type_info.cc", |
| 236 | "protobuf/src/google/protobuf/util/internal/type_info_test_helper.cc", |
| 237 | "protobuf/src/google/protobuf/util/internal/utility.cc", |
| 238 | "protobuf/src/google/protobuf/util/json_util.cc", |
| 239 | "protobuf/src/google/protobuf/util/message_differencer.cc", |
| 240 | "protobuf/src/google/protobuf/util/time_util.cc", |
| 241 | "protobuf/src/google/protobuf/util/type_resolver_util.cc", |
| 242 | "protobuf/src/google/protobuf/wire_format.cc", |
| 243 | "protobuf/src/google/protobuf/wrappers.pb.cc", |
| 244 | ] |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 245 | configs -= [ "//gn/standalone:extra_warnings" ] |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 246 | configs += [ ":protobuf_config" ] |
| 247 | public_configs = [ ":protobuf_gen_config" ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 248 | } |
| 249 | |
| 250 | if (current_toolchain == host_toolchain) { |
Primiano Tucci | fd48423 | 2017-10-25 00:15:39 +0100 | [diff] [blame] | 251 | source_set("protoc_lib") { |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 252 | deps = [ |
| 253 | ":protobuf_full", |
| 254 | ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 255 | sources = [ |
| 256 | "protobuf/src/google/protobuf/compiler/code_generator.cc", |
| 257 | "protobuf/src/google/protobuf/compiler/command_line_interface.cc", |
| 258 | "protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc", |
| 259 | "protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc", |
| 260 | "protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc", |
| 261 | "protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc", |
| 262 | "protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc", |
| 263 | "protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc", |
| 264 | "protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc", |
| 265 | "protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc", |
| 266 | "protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc", |
| 267 | "protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc", |
| 268 | "protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", |
| 269 | "protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc", |
| 270 | "protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc", |
| 271 | "protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc", |
| 272 | "protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc", |
| 273 | "protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc", |
| 274 | "protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc", |
| 275 | "protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc", |
| 276 | "protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc", |
| 277 | "protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.cc", |
| 278 | "protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc", |
| 279 | "protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc", |
| 280 | "protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc", |
| 281 | "protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc", |
| 282 | "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", |
| 283 | "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", |
| 284 | "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", |
| 285 | "protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", |
| 286 | "protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", |
| 287 | "protobuf/src/google/protobuf/compiler/java/java_context.cc", |
| 288 | "protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc", |
| 289 | "protobuf/src/google/protobuf/compiler/java/java_enum.cc", |
| 290 | "protobuf/src/google/protobuf/compiler/java/java_enum_field.cc", |
| 291 | "protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc", |
| 292 | "protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc", |
| 293 | "protobuf/src/google/protobuf/compiler/java/java_extension.cc", |
| 294 | "protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc", |
| 295 | "protobuf/src/google/protobuf/compiler/java/java_field.cc", |
| 296 | "protobuf/src/google/protobuf/compiler/java/java_file.cc", |
| 297 | "protobuf/src/google/protobuf/compiler/java/java_generator.cc", |
| 298 | "protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc", |
| 299 | "protobuf/src/google/protobuf/compiler/java/java_helpers.cc", |
| 300 | "protobuf/src/google/protobuf/compiler/java/java_lazy_message_field.cc", |
| 301 | "protobuf/src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc", |
| 302 | "protobuf/src/google/protobuf/compiler/java/java_map_field.cc", |
| 303 | "protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc", |
| 304 | "protobuf/src/google/protobuf/compiler/java/java_message.cc", |
| 305 | "protobuf/src/google/protobuf/compiler/java/java_message_builder.cc", |
| 306 | "protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc", |
| 307 | "protobuf/src/google/protobuf/compiler/java/java_message_field.cc", |
| 308 | "protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc", |
| 309 | "protobuf/src/google/protobuf/compiler/java/java_message_lite.cc", |
| 310 | "protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc", |
| 311 | "protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc", |
| 312 | "protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc", |
| 313 | "protobuf/src/google/protobuf/compiler/java/java_service.cc", |
| 314 | "protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc", |
| 315 | "protobuf/src/google/protobuf/compiler/java/java_string_field.cc", |
| 316 | "protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc", |
| 317 | "protobuf/src/google/protobuf/compiler/javanano/javanano_enum.cc", |
| 318 | "protobuf/src/google/protobuf/compiler/javanano/javanano_enum_field.cc", |
| 319 | "protobuf/src/google/protobuf/compiler/javanano/javanano_extension.cc", |
| 320 | "protobuf/src/google/protobuf/compiler/javanano/javanano_field.cc", |
| 321 | "protobuf/src/google/protobuf/compiler/javanano/javanano_file.cc", |
| 322 | "protobuf/src/google/protobuf/compiler/javanano/javanano_generator.cc", |
| 323 | "protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc", |
| 324 | "protobuf/src/google/protobuf/compiler/javanano/javanano_map_field.cc", |
| 325 | "protobuf/src/google/protobuf/compiler/javanano/javanano_message.cc", |
| 326 | "protobuf/src/google/protobuf/compiler/javanano/javanano_message_field.cc", |
| 327 | "protobuf/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc", |
| 328 | "protobuf/src/google/protobuf/compiler/js/js_generator.cc", |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 329 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc", |
| 330 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", |
| 331 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc", |
| 332 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_field.cc", |
| 333 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_file.cc", |
| 334 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_generator.cc", |
| 335 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc", |
| 336 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc", |
| 337 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message.cc", |
| 338 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc", |
| 339 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc", |
| 340 | "protobuf/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", |
| 341 | "protobuf/src/google/protobuf/compiler/plugin.cc", |
| 342 | "protobuf/src/google/protobuf/compiler/plugin.pb.cc", |
| 343 | "protobuf/src/google/protobuf/compiler/python/python_generator.cc", |
| 344 | "protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc", |
| 345 | "protobuf/src/google/protobuf/compiler/subprocess.cc", |
| 346 | "protobuf/src/google/protobuf/compiler/zip_writer.cc", |
| 347 | ] |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 348 | configs -= [ "//gn/standalone:extra_warnings" ] |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 349 | configs += [ ":protobuf_config" ] |
| 350 | public_configs = [ ":protobuf_gen_config" ] |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 351 | } |
Primiano Tucci | fd48423 | 2017-10-25 00:15:39 +0100 | [diff] [blame] | 352 | |
| 353 | executable("protoc") { |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 354 | deps = [ |
| 355 | ":protoc_lib", |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 356 | "//gn:default_deps", |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 357 | ] |
Primiano Tucci | fd48423 | 2017-10-25 00:15:39 +0100 | [diff] [blame] | 358 | sources = [ |
| 359 | "protobuf/src/google/protobuf/compiler/main.cc", |
| 360 | ] |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 361 | configs -= [ "//gn/standalone:extra_warnings" ] |
Primiano Tucci | fd48423 | 2017-10-25 00:15:39 +0100 | [diff] [blame] | 362 | } |
Primiano Tucci | ae2879e | 2017-09-27 11:02:09 +0900 | [diff] [blame] | 363 | } # host_toolchain |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 364 | |
| 365 | if (use_custom_libcxx) { |
| 366 | # Config applied to both libc++ and libc++abi targets below. |
| 367 | config("libc++config") { |
| 368 | defines = [ |
| 369 | "LIBCXX_BUILDING_LIBCXXABI", |
| 370 | "_LIBCXXABI_NO_EXCEPTIONS", |
| 371 | "_LIBCPP_OVERRIDABLE_FUNC_VIS=__attribute__((__visibility__(\"default\")))", |
| 372 | ] |
| 373 | cflags = [ |
| 374 | "-fPIC", |
| 375 | "-fstrict-aliasing", |
| 376 | ] |
| 377 | } |
| 378 | |
Primiano Tucci | 7278dea | 2017-10-31 11:50:32 +0000 | [diff] [blame] | 379 | source_set("libunwind") { |
| 380 | sources = [ |
| 381 | "libunwind/src/Unwind-EHABI.cpp", |
| 382 | "libunwind/src/Unwind-sjlj.c", |
| 383 | "libunwind/src/UnwindLevel1-gcc-ext.c", |
| 384 | "libunwind/src/UnwindLevel1.c", |
| 385 | "libunwind/src/UnwindRegistersRestore.S", |
| 386 | "libunwind/src/UnwindRegistersSave.S", |
| 387 | "libunwind/src/libunwind.cpp", |
| 388 | ] |
| 389 | include_dirs = [ "libunwind/include" ] |
| 390 | configs -= [ |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 391 | "//gn/standalone:extra_warnings", |
| 392 | "//gn/standalone:no_exceptions", |
| 393 | "//gn/standalone:no_rtti", |
Primiano Tucci | 7278dea | 2017-10-31 11:50:32 +0000 | [diff] [blame] | 394 | |
| 395 | # When building with msan, libunwind itself triggers memory violations |
| 396 | # that causes msan to get stuck into an infinite loop. Just don't |
| 397 | # instrument libunwind itself. |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 398 | "//gn/standalone/sanitizers:sanitizers_cflags", |
Primiano Tucci | 7278dea | 2017-10-31 11:50:32 +0000 | [diff] [blame] | 399 | ] |
| 400 | configs += [ |
| 401 | ":libc++config", |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 402 | "//gn/standalone/sanitizers:sanitizer_options_link_helper", |
Primiano Tucci | 7278dea | 2017-10-31 11:50:32 +0000 | [diff] [blame] | 403 | ] |
| 404 | } |
| 405 | |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 406 | source_set("libc++abi") { |
| 407 | sources = [ |
| 408 | "libcxxabi/src/abort_message.cpp", |
| 409 | "libcxxabi/src/cxa_aux_runtime.cpp", |
| 410 | "libcxxabi/src/cxa_default_handlers.cpp", |
| 411 | "libcxxabi/src/cxa_demangle.cpp", |
| 412 | "libcxxabi/src/cxa_exception.cpp", |
| 413 | "libcxxabi/src/cxa_exception_storage.cpp", |
| 414 | "libcxxabi/src/cxa_guard.cpp", |
| 415 | "libcxxabi/src/cxa_handlers.cpp", |
| 416 | "libcxxabi/src/cxa_personality.cpp", |
| 417 | "libcxxabi/src/cxa_unexpected.cpp", |
| 418 | "libcxxabi/src/cxa_vector.cpp", |
| 419 | "libcxxabi/src/cxa_virtual.cpp", |
| 420 | "libcxxabi/src/fallback_malloc.cpp", |
| 421 | "libcxxabi/src/private_typeinfo.cpp", |
| 422 | "libcxxabi/src/stdlib_exception.cpp", |
| 423 | "libcxxabi/src/stdlib_stdexcept.cpp", |
| 424 | "libcxxabi/src/stdlib_typeinfo.cpp", |
| 425 | ] |
| 426 | |
| 427 | # On linux this seems to introduce an unwanted glibc 2.18 dependency. |
| 428 | if (is_android) { |
| 429 | sources += [ "libcxxabi/src/cxa_thread_atexit.cpp" ] |
| 430 | } |
| 431 | configs -= [ |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 432 | "//gn/standalone:extra_warnings", |
| 433 | "//gn/standalone:no_exceptions", |
| 434 | "//gn/standalone:no_rtti", |
Primiano Tucci | 5aab758 | 2017-12-07 12:22:03 +0000 | [diff] [blame] | 435 | "//gn/standalone:visibility_hidden", |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 436 | ] |
| 437 | configs += [ |
| 438 | ":libc++config", |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 439 | "//gn/standalone/sanitizers:sanitizer_options_link_helper", |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 440 | ] |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 441 | deps = [ |
| 442 | ":libunwind", |
| 443 | ] |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 444 | } |
| 445 | |
Primiano Tucci | 7278dea | 2017-10-31 11:50:32 +0000 | [diff] [blame] | 446 | if (custom_libcxx_is_static) { |
| 447 | libcxx_target_type = "source_set" |
| 448 | } else { |
| 449 | libcxx_target_type = "shared_library" |
| 450 | } |
| 451 | |
| 452 | target(libcxx_target_type, "libc++") { |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 453 | sources = [ |
| 454 | "libcxx/src/algorithm.cpp", |
| 455 | "libcxx/src/any.cpp", |
| 456 | "libcxx/src/bind.cpp", |
| 457 | "libcxx/src/chrono.cpp", |
| 458 | "libcxx/src/condition_variable.cpp", |
| 459 | "libcxx/src/debug.cpp", |
| 460 | "libcxx/src/exception.cpp", |
| 461 | "libcxx/src/functional.cpp", |
| 462 | "libcxx/src/future.cpp", |
| 463 | "libcxx/src/hash.cpp", |
| 464 | "libcxx/src/ios.cpp", |
| 465 | "libcxx/src/iostream.cpp", |
| 466 | "libcxx/src/locale.cpp", |
| 467 | "libcxx/src/memory.cpp", |
| 468 | "libcxx/src/mutex.cpp", |
| 469 | "libcxx/src/new.cpp", |
| 470 | "libcxx/src/optional.cpp", |
| 471 | "libcxx/src/random.cpp", |
| 472 | "libcxx/src/regex.cpp", |
| 473 | "libcxx/src/shared_mutex.cpp", |
| 474 | "libcxx/src/stdexcept.cpp", |
| 475 | "libcxx/src/string.cpp", |
| 476 | "libcxx/src/strstream.cpp", |
| 477 | "libcxx/src/system_error.cpp", |
| 478 | "libcxx/src/thread.cpp", |
| 479 | "libcxx/src/typeinfo.cpp", |
| 480 | "libcxx/src/utility.cpp", |
| 481 | "libcxx/src/valarray.cpp", |
| 482 | "libcxx/src/variant.cpp", |
Primiano Tucci | c2eb510 | 2018-05-15 10:40:01 +0100 | [diff] [blame] | 483 | "libcxx/src/vector.cpp", |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 484 | ] |
| 485 | configs -= [ |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 486 | "//gn/standalone:extra_warnings", |
| 487 | "//gn/standalone:no_exceptions", |
| 488 | "//gn/standalone:no_rtti", |
Primiano Tucci | 5aab758 | 2017-12-07 12:22:03 +0000 | [diff] [blame] | 489 | "//gn/standalone:visibility_hidden", |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 490 | ] |
| 491 | configs += [ |
| 492 | ":libc++config", |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 493 | "//gn/standalone/sanitizers:sanitizer_options_link_helper", |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 494 | ] |
| 495 | defines = [ "_LIBCPP_BUILDING_LIBRARY" ] |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 496 | deps = [ |
| 497 | ":libc++abi", |
| 498 | ] |
Primiano Tucci | 0825bc8 | 2017-09-28 18:50:23 +0100 | [diff] [blame] | 499 | } |
| 500 | } # if (use_custom_libcxx) |
Hector Dearman | 88a1011 | 2017-10-12 11:07:10 +0100 | [diff] [blame] | 501 | |
| 502 | config("benchmark_config") { |
Primiano Tucci | 2a29ac7 | 2017-10-24 17:47:19 +0100 | [diff] [blame] | 503 | include_dirs = [ "benchmark/include" ] |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 504 | configs = [ ":test_warning_suppressions" ] |
Hector Dearman | 88a1011 | 2017-10-12 11:07:10 +0100 | [diff] [blame] | 505 | } |
| 506 | |
| 507 | source_set("benchmark") { |
| 508 | testonly = true |
| 509 | sources = [ |
| 510 | "benchmark/include/benchmark/benchmark.h", |
| 511 | "benchmark/include/benchmark/benchmark_api.h", |
| 512 | "benchmark/include/benchmark/reporter.h", |
| 513 | "benchmark/src/arraysize.h", |
| 514 | "benchmark/src/benchmark.cc", |
| 515 | "benchmark/src/benchmark_api_internal.h", |
| 516 | "benchmark/src/benchmark_register.cc", |
| 517 | "benchmark/src/check.h", |
| 518 | "benchmark/src/colorprint.cc", |
| 519 | "benchmark/src/colorprint.h", |
| 520 | "benchmark/src/commandlineflags.cc", |
| 521 | "benchmark/src/commandlineflags.h", |
| 522 | "benchmark/src/complexity.cc", |
| 523 | "benchmark/src/complexity.h", |
| 524 | "benchmark/src/console_reporter.cc", |
| 525 | "benchmark/src/counter.cc", |
| 526 | "benchmark/src/counter.h", |
| 527 | "benchmark/src/csv_reporter.cc", |
| 528 | "benchmark/src/cycleclock.h", |
| 529 | "benchmark/src/internal_macros.h", |
| 530 | "benchmark/src/json_reporter.cc", |
| 531 | "benchmark/src/log.h", |
| 532 | "benchmark/src/mutex.h", |
| 533 | "benchmark/src/re.h", |
| 534 | "benchmark/src/reporter.cc", |
| 535 | "benchmark/src/sleep.cc", |
| 536 | "benchmark/src/sleep.h", |
Lalit Maganti | c99d93c | 2018-03-22 15:09:30 +0000 | [diff] [blame] | 537 | "benchmark/src/statistics.cc", |
| 538 | "benchmark/src/statistics.h", |
Hector Dearman | 88a1011 | 2017-10-12 11:07:10 +0100 | [diff] [blame] | 539 | "benchmark/src/string_util.cc", |
| 540 | "benchmark/src/string_util.h", |
| 541 | "benchmark/src/sysinfo.cc", |
| 542 | "benchmark/src/sysinfo.h", |
| 543 | "benchmark/src/timers.cc", |
| 544 | "benchmark/src/timers.h", |
| 545 | ] |
| 546 | defines = [ "HAVE_POSIX_REGEX" ] |
| 547 | public_configs = [ ":benchmark_config" ] |
| 548 | all_dependent_configs = [ ":benchmark_config" ] |
Primiano Tucci | 7a40e4d | 2017-12-06 09:51:09 +0000 | [diff] [blame] | 549 | configs -= [ "//gn/standalone:extra_warnings" ] |
Hector Dearman | 88a1011 | 2017-10-12 11:07:10 +0100 | [diff] [blame] | 550 | } |
Primiano Tucci | 38faa6f | 2018-04-01 20:12:08 +0200 | [diff] [blame] | 551 | |
| 552 | # On Linux/Android use libbacktrace in debug builds for better stacktraces. |
| 553 | if (is_linux || is_android) { |
| 554 | config("libbacktrace_config") { |
Primiano Tucci | 38faa6f | 2018-04-01 20:12:08 +0200 | [diff] [blame] | 555 | include_dirs = [ |
| 556 | "libbacktrace_config", |
| 557 | "libbacktrace", |
| 558 | ] |
| 559 | cflags = [ |
Primiano Tucci | 3cbb10a | 2018-04-10 17:52:40 +0100 | [diff] [blame] | 560 | # We force include this config file because "config.h" is too generic as a |
| 561 | # file name and on some platforms #include "config.h" ends up colliding |
| 562 | # importing some other project's config.h. |
Primiano Tucci | 38faa6f | 2018-04-01 20:12:08 +0200 | [diff] [blame] | 563 | "-include", |
| 564 | rebase_path("libbacktrace_config/config.h", root_build_dir), |
| 565 | ] |
| 566 | } |
| 567 | |
| 568 | source_set("libbacktrace") { |
| 569 | sources = [ |
Primiano Tucci | 38faa6f | 2018-04-01 20:12:08 +0200 | [diff] [blame] | 570 | "libbacktrace/dwarf.c", |
| 571 | "libbacktrace/elf.c", |
| 572 | "libbacktrace/fileline.c", |
| 573 | "libbacktrace/mmap.c", |
| 574 | "libbacktrace/mmapio.c", |
| 575 | "libbacktrace/posix.c", |
Primiano Tucci | 38faa6f | 2018-04-01 20:12:08 +0200 | [diff] [blame] | 576 | "libbacktrace/sort.c", |
| 577 | "libbacktrace/state.c", |
| 578 | ] |
| 579 | configs -= [ "//gn/standalone:extra_warnings" ] |
| 580 | public_configs = [ ":libbacktrace_config" ] |
| 581 | } |
| 582 | } |
Lalit Maganti | b123f26 | 2018-05-22 14:05:03 +0100 | [diff] [blame] | 583 | |
| 584 | config("sqlite_config") { |
| 585 | include_dirs = [ "sqlite" ] |
| 586 | cflags = [ |
| 587 | "-DSQLITE_THREADSAFE=0", |
| 588 | "-DQLITE_DEFAULT_MEMSTATUS=0", |
| 589 | "-DSQLITE_LIKE_DOESNT_MATCH_BLOBS", |
Lalit Maganti | b123f26 | 2018-05-22 14:05:03 +0100 | [diff] [blame] | 590 | "-DSQLITE_OMIT_DEPRECATED", |
| 591 | "-DSQLITE_OMIT_SHARED_CACHE", |
| 592 | "-DHAVE_USLEEP", |
| 593 | "-DHAVE_UTIME", |
| 594 | "-DSQLITE_BYTEORDER=1234", |
| 595 | "-DSQLITE_DEFAULT_AUTOVACUUM=0", |
| 596 | "-DSQLITE_DEFAULT_MMAP_SIZE=0", |
| 597 | "-DSQLITE_CORE", |
Lalit Maganti | 8d31c73 | 2018-06-21 14:23:04 +0100 | [diff] [blame] | 598 | "-DSQLITE_TEMP_STORE=3", |
Lalit Maganti | c6347f0 | 2018-06-25 14:03:46 +0100 | [diff] [blame] | 599 | "-DSQLITE_OMIT_LOAD_EXTENSION", |
Hector Dearman | 7af3357 | 2018-09-19 17:42:25 +0100 | [diff] [blame^] | 600 | "-DSQLITE_OMIT_RANDOMNESS", |
Lalit Maganti | b123f26 | 2018-05-22 14:05:03 +0100 | [diff] [blame] | 601 | ] |
| 602 | } |
| 603 | |
| 604 | source_set("sqlite") { |
| 605 | sources = [ |
| 606 | "sqlite/sqlite3.c", |
| 607 | "sqlite/sqlite3.h", |
| 608 | "sqlite/sqlite3ext.h", |
| 609 | ] |
| 610 | configs -= [ "//gn/standalone:extra_warnings" ] |
| 611 | public_configs = [ ":sqlite_config" ] |
| 612 | } |
| 613 | |
| 614 | source_set("sqlite_shell") { |
| 615 | testonly = true |
| 616 | sources = [ |
| 617 | "sqlite/shell.c", |
| 618 | ] |
| 619 | configs -= [ "//gn/standalone:extra_warnings" ] |
| 620 | deps = [ |
| 621 | ":sqlite", |
| 622 | ] |
| 623 | } |
Primiano Tucci | 0d72a31 | 2018-08-07 14:42:45 +0100 | [diff] [blame] | 624 | |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 625 | source_set("lzma") { |
| 626 | defines = [ "_7ZIP_ST" ] |
| 627 | sources = [ |
| 628 | "lzma/C/7zAlloc.c", |
| 629 | "lzma/C/7zArcIn.c", |
| 630 | "lzma/C/7zBuf.c", |
| 631 | "lzma/C/7zBuf2.c", |
| 632 | "lzma/C/7zCrc.c", |
| 633 | "lzma/C/7zCrcOpt.c", |
| 634 | "lzma/C/7zDec.c", |
| 635 | "lzma/C/7zFile.c", |
| 636 | "lzma/C/7zStream.c", |
| 637 | "lzma/C/Aes.c", |
| 638 | "lzma/C/AesOpt.c", |
| 639 | "lzma/C/Alloc.c", |
| 640 | "lzma/C/Bcj2.c", |
| 641 | "lzma/C/Bra.c", |
| 642 | "lzma/C/Bra86.c", |
| 643 | "lzma/C/BraIA64.c", |
| 644 | "lzma/C/CpuArch.c", |
| 645 | "lzma/C/Delta.c", |
| 646 | "lzma/C/LzFind.c", |
| 647 | "lzma/C/Lzma2Dec.c", |
| 648 | "lzma/C/Lzma2Enc.c", |
| 649 | "lzma/C/Lzma86Dec.c", |
| 650 | "lzma/C/Lzma86Enc.c", |
| 651 | "lzma/C/LzmaDec.c", |
| 652 | "lzma/C/LzmaEnc.c", |
| 653 | "lzma/C/LzmaLib.c", |
| 654 | "lzma/C/Ppmd7.c", |
| 655 | "lzma/C/Ppmd7Dec.c", |
| 656 | "lzma/C/Ppmd7Enc.c", |
| 657 | "lzma/C/Sha256.c", |
| 658 | "lzma/C/Sort.c", |
| 659 | "lzma/C/Xz.c", |
| 660 | "lzma/C/XzCrc64.c", |
| 661 | "lzma/C/XzCrc64Opt.c", |
| 662 | "lzma/C/XzDec.c", |
| 663 | "lzma/C/XzEnc.c", |
| 664 | "lzma/C/XzIn.c", |
| 665 | ] |
| 666 | configs -= [ "//gn/standalone:extra_warnings" ] |
| 667 | cflags = [ |
| 668 | "-Wno-empty-body", |
| 669 | "-Wno-enum-conversion", |
| 670 | ] |
| 671 | } |
Florian Mayer | a2fae26 | 2018-08-31 12:10:01 -0700 | [diff] [blame] | 672 | |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 673 | source_set("libunwindstack") { |
| 674 | include_dirs = [ |
Florian Mayer | f833566 | 2018-08-08 11:30:32 +0100 | [diff] [blame] | 675 | "android-core/libunwindstack/include", |
| 676 | "android-core/libunwindstack", |
| 677 | "android-core/base/include", |
| 678 | "android-core/liblog/include", |
| 679 | "android-core/libprocinfo/include", |
| 680 | "android-core/include", |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 681 | "lzma/C", |
| 682 | ] |
| 683 | deps = [ |
| 684 | ":lzma", |
| 685 | ] |
| 686 | defines = [ "NO_LIBDEXFILE_SUPPORT" ] |
| 687 | sources = [ |
Florian Mayer | f833566 | 2018-08-08 11:30:32 +0100 | [diff] [blame] | 688 | "android-core/base/file.cpp", |
| 689 | "android-core/base/logging.cpp", |
| 690 | "android-core/base/stringprintf.cpp", |
| 691 | "android-core/base/strings.cpp", |
| 692 | "android-core/base/threads.cpp", |
| 693 | "android-core/libunwindstack/ArmExidx.cpp", |
| 694 | "android-core/libunwindstack/DwarfCfa.cpp", |
| 695 | "android-core/libunwindstack/DwarfEhFrameWithHdr.cpp", |
| 696 | "android-core/libunwindstack/DwarfMemory.cpp", |
| 697 | "android-core/libunwindstack/DwarfOp.cpp", |
| 698 | "android-core/libunwindstack/DwarfSection.cpp", |
| 699 | "android-core/libunwindstack/Elf.cpp", |
| 700 | "android-core/libunwindstack/ElfInterface.cpp", |
| 701 | "android-core/libunwindstack/ElfInterfaceArm.cpp", |
| 702 | "android-core/libunwindstack/JitDebug.cpp", |
| 703 | "android-core/libunwindstack/LocalUnwinder.cpp", |
| 704 | "android-core/libunwindstack/Log.cpp", |
| 705 | "android-core/libunwindstack/MapInfo.cpp", |
| 706 | "android-core/libunwindstack/Maps.cpp", |
| 707 | "android-core/libunwindstack/Memory.cpp", |
| 708 | "android-core/libunwindstack/Regs.cpp", |
| 709 | "android-core/libunwindstack/RegsArm.cpp", |
| 710 | "android-core/libunwindstack/RegsArm64.cpp", |
| 711 | "android-core/libunwindstack/RegsMips.cpp", |
| 712 | "android-core/libunwindstack/RegsMips64.cpp", |
| 713 | "android-core/libunwindstack/RegsX86.cpp", |
| 714 | "android-core/libunwindstack/RegsX86_64.cpp", |
| 715 | "android-core/libunwindstack/Symbols.cpp", |
| 716 | "android-core/libunwindstack/Unwinder.cpp", |
| 717 | "android-core/libunwindstack/tests/LogFake.cpp", |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 718 | ] |
| 719 | if (current_cpu == "x86") { |
Florian Mayer | f833566 | 2018-08-08 11:30:32 +0100 | [diff] [blame] | 720 | sources += [ "android-core/libunwindstack/AsmGetRegsX86.S" ] |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 721 | } else if (current_cpu == "x64") { |
Florian Mayer | f833566 | 2018-08-08 11:30:32 +0100 | [diff] [blame] | 722 | sources += [ "android-core/libunwindstack/AsmGetRegsX86_64.S" ] |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 723 | } |
| 724 | configs -= [ |
| 725 | "//gn/standalone:extra_warnings", |
| 726 | "//gn/standalone:c++11", |
Florian Mayer | a2fae26 | 2018-08-31 12:10:01 -0700 | [diff] [blame] | 727 | "//gn/standalone:visibility_hidden", |
Florian Mayer | 475bd7e | 2018-08-07 20:04:03 +0100 | [diff] [blame] | 728 | ] |
| 729 | configs += [ "//gn/standalone:c++17" ] |
| 730 | public_configs = [ ":libunwindstack_config" ] |
| 731 | } |
| 732 | |
Primiano Tucci | 0d72a31 | 2018-08-07 14:42:45 +0100 | [diff] [blame] | 733 | config("jsoncpp_config") { |
| 734 | cflags = [ |
| 735 | "-DJSON_USE_EXCEPTION=0", |
| 736 | |
| 737 | # Using -isystem instead of include_dirs (-I), so we don't need to suppress |
Florian Mayer | bda0c44 | 2018-09-07 10:53:55 +0100 | [diff] [blame] | 738 | # warnings coming from third-party headers. Doing so would mask warnings in |
Primiano Tucci | 0d72a31 | 2018-08-07 14:42:45 +0100 | [diff] [blame] | 739 | # our own code. |
| 740 | "-isystem", |
| 741 | rebase_path("jsoncpp/include", root_build_dir), |
| 742 | ] |
| 743 | } |
| 744 | |
| 745 | source_set("jsoncpp") { |
| 746 | sources = [ |
| 747 | "jsoncpp/src/lib_json/json_reader.cpp", |
| 748 | "jsoncpp/src/lib_json/json_value.cpp", |
| 749 | "jsoncpp/src/lib_json/json_writer.cpp", |
| 750 | ] |
| 751 | configs -= [ "//gn/standalone:extra_warnings" ] |
| 752 | public_configs = [ ":jsoncpp_config" ] |
| 753 | } |