1# Copyright 2018 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//third_party/abseil-cpp/absl.gni") 6 7absl_source_set("atomic_hook") { 8 public = [ "internal/atomic_hook.h" ] 9 public_deps = [ 10 ":config", 11 ":core_headers", 12 ] 13 visibility = [ "//third_party/abseil-cpp/absl/*" ] 14} 15 16absl_source_set("errno_saver") { 17 public = [ "internal/errno_saver.h" ] 18 public_deps = [ ":config" ] 19 visibility = [ "//third_party/abseil-cpp/absl/*" ] 20} 21 22absl_source_set("log_severity") { 23 sources = [ "log_severity.cc" ] 24 public = [ "log_severity.h" ] 25 public_deps = [ 26 ":config", 27 ":core_headers", 28 ] 29} 30 31absl_source_set("raw_logging_internal") { 32 sources = [ "internal/raw_logging.cc" ] 33 public = [ "internal/raw_logging.h" ] 34 public_deps = [ 35 ":atomic_hook", 36 ":config", 37 ":core_headers", 38 ":log_severity", 39 ] 40 visibility = [ "//third_party/abseil-cpp/absl/*" ] 41} 42 43absl_source_set("spinlock_wait") { 44 sources = [ 45 "internal/spinlock_akaros.inc", 46 "internal/spinlock_linux.inc", 47 "internal/spinlock_posix.inc", 48 "internal/spinlock_wait.cc", 49 "internal/spinlock_win32.inc", 50 ] 51 public = [ "internal/spinlock_wait.h" ] 52 deps = [ 53 ":base_internal", 54 ":core_headers", 55 ":errno_saver", 56 ] 57 visibility = [ "//third_party/abseil-cpp/absl/base:*" ] 58} 59 60absl_source_set("config") { 61 public = [ 62 "config.h", 63 "options.h", 64 "policy_checks.h", 65 ] 66} 67 68absl_source_set("dynamic_annotations") { 69 public = [ "dynamic_annotations.h" ] 70 71 # Abseil's dynamic annotations are only visible inside Abseil because 72 # their usage is deprecated in Chromium (see README.chromium for more info). 73 visibility = [ "//third_party/abseil-cpp/absl/*" ] 74 deps = [ 75 ":config", 76 ":core_headers", 77 ] 78} 79 80absl_source_set("core_headers") { 81 public = [ 82 "attributes.h", 83 "const_init.h", 84 "macros.h", 85 "optimization.h", 86 "port.h", 87 "thread_annotations.h", 88 ] 89 public_deps = [ ":config" ] 90} 91 92absl_source_set("malloc_internal") { 93 sources = [ "internal/low_level_alloc.cc" ] 94 public = [ 95 "internal/direct_mmap.h", 96 "internal/low_level_alloc.h", 97 ] 98 public_deps = [ 99 ":base", 100 ":base_internal", 101 ":config", 102 ":core_headers", 103 ":dynamic_annotations", 104 ":raw_logging_internal", 105 ] 106} 107 108absl_source_set("base_internal") { 109 public = [ 110 "internal/hide_ptr.h", 111 "internal/identity.h", 112 "internal/inline_variable.h", 113 "internal/invoke.h", 114 "internal/scheduling_mode.h", 115 ] 116 public_deps = [ 117 ":config", 118 "//third_party/abseil-cpp/absl/meta:type_traits", 119 ] 120 visibility = [ "//third_party/abseil-cpp/absl/*" ] 121} 122 123absl_source_set("base") { 124 sources = [ 125 "internal/cycleclock.cc", 126 "internal/spinlock.cc", 127 "internal/sysinfo.cc", 128 "internal/thread_identity.cc", 129 "internal/unscaledcycleclock.cc", 130 ] 131 public = [ 132 "call_once.h", 133 "casts.h", 134 "internal/cycleclock.h", 135 "internal/low_level_scheduling.h", 136 "internal/per_thread_tls.h", 137 "internal/spinlock.h", 138 "internal/sysinfo.h", 139 "internal/thread_identity.h", 140 "internal/tsan_mutex_interface.h", 141 "internal/unscaledcycleclock.h", 142 ] 143 144 # TODO(mbonadei): The bazel file has: 145 # "-DEFAULTLIB:advapi32.lib" 146 # understand if this is needed here as well. 147 public_deps = [ 148 ":atomic_hook", 149 ":base_internal", 150 ":config", 151 ":core_headers", 152 ":dynamic_annotations", 153 ":log_severity", 154 ":raw_logging_internal", 155 ":spinlock_wait", 156 "//third_party/abseil-cpp/absl/meta:type_traits", 157 ] 158} 159 160absl_source_set("throw_delegate") { 161 sources = [ "internal/throw_delegate.cc" ] 162 public = [ "internal/throw_delegate.h" ] 163 public_deps = [ 164 ":config", 165 ":raw_logging_internal", 166 ] 167 visibility = [ "//third_party/abseil-cpp/absl/*" ] 168} 169 170absl_source_set("exception_testing") { 171 testonly = true 172 public = [ "internal/exception_testing.h" ] 173 public_deps = [ ":config" ] 174 visibility = [ "//third_party/abseil-cpp/absl/*" ] 175} 176 177absl_source_set("pretty_function") { 178 public = [ "internal/pretty_function.h" ] 179 visibility = [ "//third_party/abseil-cpp/absl/*" ] 180} 181 182# TODO(mbonadei): This target throws by design. We should probably 183# just remove it. 184# source_set("exception_safety_testing") { 185# testonly = true 186# configs -= [ "//build/config/compiler:chromium_code" ] 187# configs += [ 188# "//build/config/compiler:no_chromium_code", 189# "//third_party/abseil-cpp:absl_test_cflags_cc", 190# ] 191# public_configs = [ "//third_party/abseil-cpp:absl_include_config" ] 192# sources = [ 193# "internal/exception_safety_testing.cc", 194# ] 195# public = [ 196# "internal/exception_safety_testing.h", 197# ] 198# deps = [ 199# ":config", 200# ":pretty_function", 201# "//third_party/abseil-cpp/absl/memory", 202# "//third_party/abseil-cpp/absl/meta:type_traits", 203# "//third_party/abseil-cpp/absl/strings", 204# "//third_party/abseil-cpp/absl/utility", 205# "//third_party/googletest:gtest", 206# ] 207# } 208 209absl_source_set("spinlock_test_common") { 210 testonly = true 211 sources = [ "spinlock_test_common.cc" ] 212 deps = [ 213 ":base", 214 ":base_internal", 215 ":config", 216 ":core_headers", 217 "//third_party/abseil-cpp/absl/synchronization", 218 "//third_party/googletest:gtest", 219 ] 220} 221 222absl_source_set("endian") { 223 public = [ 224 "internal/endian.h", 225 "internal/unaligned_access.h", 226 ] 227 public_deps = [ 228 ":base", 229 ":config", 230 ":core_headers", 231 ] 232} 233 234absl_source_set("exponential_biased") { 235 sources = [ "internal/exponential_biased.cc" ] 236 public = [ "internal/exponential_biased.h" ] 237 public_deps = [ 238 ":config", 239 ":core_headers", 240 ] 241 visibility = [ "//third_party/abseil-cpp/absl/*" ] 242} 243 244absl_source_set("periodic_sampler") { 245 sources = [ "internal/periodic_sampler.cc" ] 246 public = [ "internal/periodic_sampler.h" ] 247 public_deps = [ 248 ":core_headers", 249 ":exponential_biased", 250 ] 251} 252 253absl_source_set("scoped_set_env") { 254 testonly = true 255 public = [ "internal/scoped_set_env.h" ] 256 sources = [ "internal/scoped_set_env.cc" ] 257 public_deps = [ 258 ":config", 259 ] 260 deps = [ 261 ":raw_logging_internal", 262 ] 263 visibility = [ "//third_party/abseil-cpp/absl/*" ] 264} 265 266absl_source_set("strerror") { 267 sources = [ "internal/strerror.cc" ] 268 public = [ "internal/strerror.h" ] 269 public_deps = [ 270 ":config", 271 ] 272 deps = [ 273 ":core_headers", 274 ":errno_saver", 275 ] 276 visibility = [ "//third_party/abseil-cpp/absl/*" ] 277} 278 279absl_source_set("fast_type_id") { 280 public = [ "internal/fast_type_id.h" ] 281 public_deps = [ ":config" ] 282 visibility = [ "//third_party/abseil-cpp/absl/*" ] 283} 284 285absl_source_set("config_test") { 286 testonly = true 287 sources = [ "config_test.cc" ] 288 deps = [ 289 ":config", 290 "//third_party/abseil-cpp/absl/synchronization:thread_pool", 291 "//third_party/googletest:gtest", 292 ] 293} 294