1# Copyright 2018 The Chromium Authors 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 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 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 deps = [ 26 ":config", 27 ":core_headers", 28 ] 29} 30 31absl_source_set("no_destructor") { 32 public = [ "no_destructor.h" ] 33 deps = [ 34 ":config", 35 ":nullability", 36 ] 37} 38 39absl_source_set("nullability") { 40 sources = [ "internal/nullability_impl.h" ] 41 public = [ "nullability.h" ] 42 deps = [ 43 ":config", 44 ":core_headers", 45 "//third_party/abseil-cpp/absl/meta:type_traits", 46 ] 47} 48 49absl_source_set("raw_logging_internal") { 50 sources = [ "internal/raw_logging.cc" ] 51 public = [ "internal/raw_logging.h" ] 52 deps = [ 53 ":atomic_hook", 54 ":config", 55 ":core_headers", 56 ":errno_saver", 57 ":log_severity", 58 ] 59 visibility = [ 60 "//third_party/abseil-cpp:absl_component_deps", 61 "//third_party/abseil-cpp/absl/*", 62 ] 63} 64 65absl_source_set("spinlock_wait") { 66 sources = [ 67 "internal/spinlock_akaros.inc", 68 "internal/spinlock_linux.inc", 69 "internal/spinlock_posix.inc", 70 "internal/spinlock_wait.cc", 71 "internal/spinlock_win32.inc", 72 ] 73 public = [ "internal/spinlock_wait.h" ] 74 deps = [ 75 ":base_internal", 76 ":core_headers", 77 ":errno_saver", 78 ] 79 visibility = [ "//third_party/abseil-cpp/absl/base:*" ] 80} 81 82absl_source_set("config") { 83 public = [ 84 "config.h", 85 "options.h", 86 "policy_checks.h", 87 ] 88} 89 90absl_source_set("cycleclock_internal") { 91 public = [ 92 "internal/cycleclock_config.h", 93 "internal/unscaledcycleclock_config.h", 94 ] 95 visibility = [ "//third_party/abseil-cpp/absl/*" ] 96 deps = [ 97 ":base_internal", 98 ":config", 99 ] 100} 101 102absl_source_set("dynamic_annotations") { 103 public = [ "dynamic_annotations.h" ] 104 105 # Abseil's dynamic annotations are only visible inside Abseil because 106 # their usage is deprecated in Chromium (see README.chromium for more info). 107 visibility = [ 108 "//third_party/abseil-cpp:absl_component_deps", 109 "//third_party/abseil-cpp/absl/*", 110 ] 111 deps = [ 112 ":config", 113 ":core_headers", 114 ] 115} 116 117absl_source_set("core_headers") { 118 public = [ 119 "attributes.h", 120 "const_init.h", 121 "macros.h", 122 "optimization.h", 123 "port.h", 124 "thread_annotations.h", 125 ] 126 deps = [ ":config" ] 127} 128 129absl_source_set("malloc_internal") { 130 sources = [ "internal/low_level_alloc.cc" ] 131 public = [ 132 "internal/direct_mmap.h", 133 "internal/low_level_alloc.h", 134 ] 135 deps = [ 136 ":base", 137 ":base_internal", 138 ":config", 139 ":core_headers", 140 ":dynamic_annotations", 141 ":raw_logging_internal", 142 ] 143} 144 145absl_source_set("base_internal") { 146 public = [ 147 "internal/hide_ptr.h", 148 "internal/identity.h", 149 "internal/inline_variable.h", 150 "internal/invoke.h", 151 "internal/scheduling_mode.h", 152 ] 153 deps = [ 154 ":config", 155 "//third_party/abseil-cpp/absl/meta:type_traits", 156 ] 157 visibility = [ "//third_party/abseil-cpp/absl/*" ] 158} 159 160absl_source_set("base") { 161 sources = [ 162 "internal/cycleclock.cc", 163 "internal/spinlock.cc", 164 "internal/sysinfo.cc", 165 "internal/thread_identity.cc", 166 "internal/unscaledcycleclock.cc", 167 ] 168 public = [ 169 "call_once.h", 170 "casts.h", 171 "internal/cycleclock.h", 172 "internal/low_level_scheduling.h", 173 "internal/per_thread_tls.h", 174 "internal/spinlock.h", 175 "internal/sysinfo.h", 176 "internal/thread_identity.h", 177 "internal/tsan_mutex_interface.h", 178 "internal/unscaledcycleclock.h", 179 ] 180 181 # TODO(mbonadei): The bazel file has: 182 # "-DEFAULTLIB:advapi32.lib" 183 # understand if this is needed here as well. 184 deps = [ 185 ":atomic_hook", 186 ":base_internal", 187 ":config", 188 ":core_headers", 189 ":cycleclock_internal", 190 ":dynamic_annotations", 191 ":log_severity", 192 ":nullability", 193 ":raw_logging_internal", 194 ":spinlock_wait", 195 "//third_party/abseil-cpp/absl/meta:type_traits", 196 ] 197} 198 199# This should be an executable() more than a test. 200# It cannot be enabled because it defines its own main() function. 201# absl_test("c_header_test") { 202# sources = ["c_header_test.c"] 203# deps = [ 204# ":config", 205# ":core_headers", 206# ] 207# } 208 209absl_source_set("throw_delegate") { 210 sources = [ "internal/throw_delegate.cc" ] 211 public = [ "internal/throw_delegate.h" ] 212 deps = [ 213 ":config", 214 ":raw_logging_internal", 215 ] 216 visibility = [ "//third_party/abseil-cpp/absl/*" ] 217} 218 219absl_source_set("exception_testing") { 220 testonly = true 221 public = [ "internal/exception_testing.h" ] 222 deps = [ ":config" ] 223 visibility = [ "//third_party/abseil-cpp/absl/*" ] 224} 225 226absl_source_set("pretty_function") { 227 public = [ "internal/pretty_function.h" ] 228 visibility = [ "//third_party/abseil-cpp/absl/*" ] 229} 230 231# TODO(mbonadei): This target throws by design. We should probably 232# just remove it. 233# source_set("exception_safety_testing") { 234# testonly = true 235# configs -= [ "//build/config/compiler:chromium_code" ] 236# configs += [ 237# "//build/config/compiler:no_chromium_code", 238# "//third_party/abseil-cpp:absl_test_cflags_cc", 239# ] 240# public_configs = [ "//third_party/abseil-cpp:absl_include_config" ] 241# sources = [ 242# "internal/exception_safety_testing.cc", 243# ] 244# public = [ 245# "internal/exception_safety_testing.h", 246# ] 247# deps = [ 248# ":config", 249# ":pretty_function", 250# "//third_party/abseil-cpp/absl/memory", 251# "//third_party/abseil-cpp/absl/meta:type_traits", 252# "//third_party/abseil-cpp/absl/strings", 253# "//third_party/abseil-cpp/absl/utility", 254# "//third_party/googletest:gtest", 255# ] 256# } 257 258absl_source_set("spinlock_test_common") { 259 testonly = true 260 sources = [ "spinlock_test_common.cc" ] 261 deps = [ 262 ":base", 263 ":base_internal", 264 ":config", 265 ":core_headers", 266 "//third_party/abseil-cpp/absl/synchronization", 267 "//third_party/googletest:gtest", 268 ] 269} 270 271absl_source_set("endian") { 272 public = [ 273 "internal/endian.h", 274 "internal/unaligned_access.h", 275 ] 276 deps = [ 277 ":base", 278 ":config", 279 ":core_headers", 280 ":nullability", 281 ] 282} 283 284absl_source_set("scoped_set_env") { 285 testonly = true 286 public = [ "internal/scoped_set_env.h" ] 287 sources = [ "internal/scoped_set_env.cc" ] 288 deps = [ 289 ":config", 290 ":raw_logging_internal", 291 ] 292 visibility = [ "//third_party/abseil-cpp/absl/*" ] 293} 294 295absl_source_set("strerror") { 296 sources = [ "internal/strerror.cc" ] 297 public = [ "internal/strerror.h" ] 298 deps = [ 299 ":config", 300 ":core_headers", 301 ":errno_saver", 302 ] 303 visibility = [ "//third_party/abseil-cpp/absl/*" ] 304} 305 306absl_source_set("fast_type_id") { 307 public = [ "internal/fast_type_id.h" ] 308 deps = [ ":config" ] 309 visibility = [ "//third_party/abseil-cpp/absl/*" ] 310} 311 312absl_source_set("prefetch") { 313 public = [ "prefetch.h" ] 314 deps = [ 315 ":config", 316 ":core_headers", 317 ] 318} 319 320absl_test("prefetch_test") { 321 sources = [ "prefetch_test.cc" ] 322 deps = [ ":prefetch" ] 323} 324 325absl_source_set("poison") { 326 public = [ "internal/poison.h" ] 327 sources = [ "internal/poison.cc" ] 328 deps = [ 329 ":config", 330 ":core_headers", 331 ":malloc_internal", 332 ] 333} 334 335absl_test("poison_test") { 336 sources = [ "internal/poison_test.cc" ] 337 deps = [ 338 ":config", 339 ":poison", 340 ] 341} 342 343absl_source_set("tracing_internal") { 344 public = [ "internal/tracing.h" ] 345 sources = [ "internal/tracing.cc" ] 346 deps = [ 347 ":config", 348 ":core_headers", 349 ] 350} 351 352absl_test("tracing_internal_weak_test") { 353 sources = [ "internal/tracing_weak_test.cc" ] 354 deps = [ ":tracing_internal" ] 355} 356 357absl_test("tracing_internal_strong_test") { 358 sources = [ "internal/tracing_strong_test.cc" ] 359 deps = [ 360 ":config", 361 ":core_headers", 362 ":tracing_internal", 363 ] 364} 365 366absl_test("config_test") { 367 sources = [ "config_test.cc" ] 368 deps = [ 369 ":config", 370 "//third_party/abseil-cpp/absl/synchronization:thread_pool", 371 ] 372} 373 374absl_test("no_destructor_test") { 375 sources = [ "no_destructor_test.cc" ] 376 deps = [ 377 ":config", 378 ":no_destructor", 379 ":raw_logging_internal", 380 ] 381} 382 383absl_test("nullability_test") { 384 sources = [ "nullability_test.cc" ] 385 deps = [ 386 ":core_headers", 387 ":nullability", 388 ] 389} 390 391absl_test("nullability_default_nonnull_test") { 392 sources = [ "nullability_default_nonnull_test.cc" ] 393 deps = [ ":nullability" ] 394} 395