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("compressed_tuple") { 8 public = [ "internal/compressed_tuple.h" ] 9 deps = [ "//third_party/abseil-cpp/absl/utility" ] 10} 11 12absl_source_set("fixed_array") { 13 public = [ "fixed_array.h" ] 14 deps = [ 15 ":compressed_tuple", 16 "//third_party/abseil-cpp/absl/algorithm", 17 "//third_party/abseil-cpp/absl/base:config", 18 "//third_party/abseil-cpp/absl/base:core_headers", 19 "//third_party/abseil-cpp/absl/base:dynamic_annotations", 20 "//third_party/abseil-cpp/absl/base:throw_delegate", 21 "//third_party/abseil-cpp/absl/memory", 22 ] 23} 24 25absl_test("fixed_array_test") { 26 sources = [ "fixed_array_test.cc" ] 27 deps = [ 28 ":fixed_array", 29 ":test_allocator", 30 ":test_instance_tracker", 31 "//third_party/abseil-cpp/absl/base:config", 32 "//third_party/abseil-cpp/absl/base:exception_testing", 33 "//third_party/abseil-cpp/absl/hash:hash_testing", 34 "//third_party/abseil-cpp/absl/memory", 35 ] 36} 37 38absl_source_set("inlined_vector_internal") { 39 public = [ "internal/inlined_vector.h" ] 40 deps = [ 41 ":compressed_tuple", 42 "//third_party/abseil-cpp/absl/base:base_internal", 43 "//third_party/abseil-cpp/absl/base:config", 44 "//third_party/abseil-cpp/absl/base:core_headers", 45 "//third_party/abseil-cpp/absl/memory", 46 "//third_party/abseil-cpp/absl/meta:type_traits", 47 "//third_party/abseil-cpp/absl/types:span", 48 ] 49} 50 51absl_source_set("inlined_vector") { 52 public = [ "inlined_vector.h" ] 53 deps = [ 54 ":inlined_vector_internal", 55 "//third_party/abseil-cpp/absl/algorithm", 56 "//third_party/abseil-cpp/absl/base:core_headers", 57 "//third_party/abseil-cpp/absl/base:throw_delegate", 58 "//third_party/abseil-cpp/absl/memory", 59 "//third_party/abseil-cpp/absl/meta:type_traits", 60 ] 61} 62 63absl_source_set("test_allocator") { 64 testonly = true 65 public = [ "internal/test_allocator.h" ] 66 deps = [ 67 "//third_party/abseil-cpp/absl/base:config", 68 "//third_party/googletest:gtest", 69 ] 70 visibility = [ ":*" ] 71} 72 73absl_test("inlined_vector_test") { 74 sources = [ "inlined_vector_test.cc" ] 75 deps = [ 76 ":inlined_vector", 77 ":test_allocator", 78 ":test_instance_tracker", 79 "//third_party/abseil-cpp/absl/base:config", 80 "//third_party/abseil-cpp/absl/base:core_headers", 81 "//third_party/abseil-cpp/absl/base:exception_testing", 82 "//third_party/abseil-cpp/absl/hash:hash_testing", 83 "//third_party/abseil-cpp/absl/log:check", 84 "//third_party/abseil-cpp/absl/memory", 85 "//third_party/abseil-cpp/absl/strings", 86 ] 87} 88 89absl_source_set("test_instance_tracker") { 90 testonly = true 91 sources = [ "internal/test_instance_tracker.cc" ] 92 public = [ "internal/test_instance_tracker.h" ] 93 deps = [ "//third_party/abseil-cpp/absl/types:compare" ] 94 visibility = [ "//third_party/abseil-cpp/absl/*" ] 95} 96 97absl_source_set("flat_hash_map") { 98 public = [ "flat_hash_map.h" ] 99 deps = [ 100 ":container_memory", 101 ":hash_container_defaults", 102 ":raw_hash_map", 103 "//third_party/abseil-cpp/absl/algorithm:container", 104 "//third_party/abseil-cpp/absl/base:core_headers", 105 "//third_party/abseil-cpp/absl/memory", 106 ] 107} 108 109absl_test("flat_hash_map_test") { 110 sources = [ "flat_hash_map_test.cc" ] 111 deps = [ 112 ":flat_hash_map", 113 ":hash_generator_testing", 114 ":test_allocator", 115 ":unordered_map_constructor_test", 116 ":unordered_map_lookup_test", 117 ":unordered_map_members_test", 118 ":unordered_map_modifiers_test", 119 "//third_party/abseil-cpp/absl/log:check", 120 "//third_party/abseil-cpp/absl/meta:type_traits", 121 "//third_party/abseil-cpp/absl/types:any", 122 ] 123} 124 125absl_source_set("flat_hash_set") { 126 public = [ "flat_hash_set.h" ] 127 deps = [ 128 ":container_memory", 129 ":hash_container_defaults", 130 ":raw_hash_set", 131 "//third_party/abseil-cpp/absl/algorithm:container", 132 "//third_party/abseil-cpp/absl/base:core_headers", 133 "//third_party/abseil-cpp/absl/memory", 134 ] 135} 136 137absl_test("flat_hash_set_test") { 138 sources = [ "flat_hash_set_test.cc" ] 139 deps = [ 140 ":container_memory", 141 ":flat_hash_set", 142 ":hash_generator_testing", 143 ":test_allocator", 144 ":unordered_set_constructor_test", 145 ":unordered_set_lookup_test", 146 ":unordered_set_members_test", 147 ":unordered_set_modifiers_test", 148 "//third_party/abseil-cpp/absl/base:config", 149 "//third_party/abseil-cpp/absl/log:check", 150 "//third_party/abseil-cpp/absl/memory", 151 "//third_party/abseil-cpp/absl/strings", 152 ] 153} 154 155absl_source_set("node_hash_map") { 156 public = [ "node_hash_map.h" ] 157 deps = [ 158 ":container_memory", 159 ":hash_container_defaults", 160 ":node_slot_policy", 161 ":raw_hash_map", 162 "//third_party/abseil-cpp/absl/algorithm:container", 163 "//third_party/abseil-cpp/absl/base:core_headers", 164 "//third_party/abseil-cpp/absl/memory", 165 ] 166} 167 168absl_source_set("node_hash_set") { 169 public = [ "node_hash_set.h" ] 170 deps = [ 171 ":container_memory", 172 ":hash_container_defaults", 173 ":node_slot_policy", 174 ":raw_hash_set", 175 "//third_party/abseil-cpp/absl/algorithm:container", 176 "//third_party/abseil-cpp/absl/base:core_headers", 177 "//third_party/abseil-cpp/absl/memory", 178 ] 179} 180 181absl_source_set("container_memory") { 182 public = [ "internal/container_memory.h" ] 183 deps = [ 184 "//third_party/abseil-cpp/absl/base:config", 185 "//third_party/abseil-cpp/absl/memory", 186 "//third_party/abseil-cpp/absl/meta:type_traits", 187 "//third_party/abseil-cpp/absl/utility", 188 ] 189} 190 191# Disabled because container_memory_test requires -frtti 192# absl_test("container_memory_test") { 193# sources = [ "internal/container_memory_test.cc" ] 194# deps = [ 195# ":container_memory", 196# ":test_instance_tracker", 197# "//third_party/abseil-cpp/absl/base:no_destructor", 198# "//third_party/abseil-cpp/absl/meta:type_traits", 199# "//third_party/abseil-cpp/absl/strings", 200# ] 201# } 202 203absl_source_set("hash_function_defaults") { 204 public = [ "internal/hash_function_defaults.h" ] 205 visibility = [ "//third_party/abseil-cpp/absl/container:*" ] 206 deps = [ 207 ":common", 208 "//third_party/abseil-cpp/absl/base:config", 209 "//third_party/abseil-cpp/absl/hash", 210 "//third_party/abseil-cpp/absl/meta:type_traits", 211 "//third_party/abseil-cpp/absl/strings", 212 "//third_party/abseil-cpp/absl/strings:cord", 213 "//third_party/abseil-cpp/absl/strings:string_view", 214 ] 215} 216 217absl_source_set("hash_container_defaults") { 218 public = [ "hash_container_defaults.h" ] 219 visibility = [ "//third_party/abseil-cpp/absl/container:*" ] 220 deps = [ 221 ":hash_function_defaults", 222 "//third_party/abseil-cpp/absl/base:config", 223 ] 224} 225 226absl_test("hash_function_defaults_test") { 227 sources = [ "internal/hash_function_defaults_test.cc" ] 228 deps = [ 229 ":flat_hash_map", 230 ":flat_hash_set", 231 ":hash_function_defaults", 232 "//third_party/abseil-cpp/absl/hash", 233 "//third_party/abseil-cpp/absl/random", 234 "//third_party/abseil-cpp/absl/strings", 235 "//third_party/abseil-cpp/absl/strings:cord", 236 "//third_party/abseil-cpp/absl/strings:cord_test_helpers", 237 ] 238} 239 240absl_source_set("hash_generator_testing") { 241 testonly = true 242 sources = [ "internal/hash_generator_testing.cc" ] 243 public = [ "internal/hash_generator_testing.h" ] 244 deps = [ 245 ":hash_policy_testing", 246 "//third_party/abseil-cpp/absl/base:no_destructor", 247 "//third_party/abseil-cpp/absl/memory", 248 "//third_party/abseil-cpp/absl/meta:type_traits", 249 "//third_party/abseil-cpp/absl/strings:string_view", 250 ] 251} 252 253absl_source_set("hash_policy_testing") { 254 testonly = true 255 public = [ "internal/hash_policy_testing.h" ] 256 deps = [ 257 "//third_party/abseil-cpp/absl/hash", 258 "//third_party/abseil-cpp/absl/strings:string_view", 259 ] 260} 261 262absl_source_set("hash_policy_traits") { 263 public = [ "internal/hash_policy_traits.h" ] 264 deps = [ 265 ":common_policy_traits", 266 "//third_party/abseil-cpp/absl/meta:type_traits", 267 ] 268} 269 270absl_source_set("common_policy_traits") { 271 public = [ "internal/common_policy_traits.h" ] 272 visibility = [ "//third_party/abseil-cpp/absl/container:*" ] 273 deps = [ "//third_party/abseil-cpp/absl/meta:type_traits" ] 274} 275 276absl_test("common_policy_traits_test") { 277 sources = [ "internal/common_policy_traits_test.cc" ] 278 deps = [ 279 ":common_policy_traits", 280 "//third_party/abseil-cpp/absl/base:config", 281 ] 282} 283 284absl_source_set("hashtable_debug") { 285 public = [ "internal/hashtable_debug.h" ] 286 deps = [ ":hashtable_debug_hooks" ] 287} 288 289absl_source_set("hashtable_debug_hooks") { 290 public = [ "internal/hashtable_debug_hooks.h" ] 291 deps = [ "//third_party/abseil-cpp/absl/base:config" ] 292} 293 294absl_source_set("hashtablez_sampler") { 295 public = [ "internal/hashtablez_sampler.h" ] 296 sources = [ 297 "internal/hashtablez_sampler.cc", 298 "internal/hashtablez_sampler_force_weak_definition.cc", 299 ] 300 deps = [ 301 "//third_party/abseil-cpp/absl/base", 302 "//third_party/abseil-cpp/absl/base:config", 303 "//third_party/abseil-cpp/absl/base:core_headers", 304 "//third_party/abseil-cpp/absl/base:no_destructor", 305 "//third_party/abseil-cpp/absl/base:raw_logging_internal", 306 "//third_party/abseil-cpp/absl/debugging:stacktrace", 307 "//third_party/abseil-cpp/absl/memory", 308 "//third_party/abseil-cpp/absl/profiling:exponential_biased", 309 "//third_party/abseil-cpp/absl/profiling:sample_recorder", 310 "//third_party/abseil-cpp/absl/synchronization", 311 "//third_party/abseil-cpp/absl/time", 312 "//third_party/abseil-cpp/absl/utility", 313 ] 314} 315 316absl_source_set("node_slot_policy") { 317 public = [ "internal/node_slot_policy.h" ] 318 deps = [ "//third_party/abseil-cpp/absl/base:config" ] 319} 320 321absl_test("node_slot_policy_test") { 322 sources = [ "internal/node_slot_policy_test.cc" ] 323 deps = [ 324 ":hash_policy_traits", 325 ":node_slot_policy", 326 "//third_party/abseil-cpp/absl/base:config", 327 ] 328} 329 330absl_source_set("raw_hash_map") { 331 public = [ "internal/raw_hash_map.h" ] 332 deps = [ 333 ":container_memory", 334 ":raw_hash_set", 335 "//third_party/abseil-cpp/absl/base:config", 336 "//third_party/abseil-cpp/absl/base:core_headers", 337 "//third_party/abseil-cpp/absl/base:throw_delegate", 338 ] 339} 340 341absl_source_set("common") { 342 public = [ "internal/common.h" ] 343 deps = [ 344 "//third_party/abseil-cpp/absl/meta:type_traits", 345 "//third_party/abseil-cpp/absl/types:optional", 346 ] 347} 348 349absl_source_set("raw_hash_set") { 350 sources = [ "internal/raw_hash_set.cc" ] 351 public = [ "internal/raw_hash_set.h" ] 352 deps = [ 353 ":common", 354 ":compressed_tuple", 355 ":container_memory", 356 ":hash_policy_traits", 357 ":hashtable_debug_hooks", 358 ":hashtablez_sampler", 359 "//third_party/abseil-cpp/absl/base:config", 360 "//third_party/abseil-cpp/absl/base:core_headers", 361 "//third_party/abseil-cpp/absl/base:dynamic_annotations", 362 "//third_party/abseil-cpp/absl/base:endian", 363 "//third_party/abseil-cpp/absl/base:prefetch", 364 "//third_party/abseil-cpp/absl/base:raw_logging_internal", 365 "//third_party/abseil-cpp/absl/hash", 366 "//third_party/abseil-cpp/absl/memory", 367 "//third_party/abseil-cpp/absl/meta:type_traits", 368 "//third_party/abseil-cpp/absl/numeric:bits", 369 "//third_party/abseil-cpp/absl/utility", 370 ] 371} 372 373absl_test("raw_hash_set_test") { 374 sources = [ "internal/raw_hash_set_test.cc" ] 375 deps = [ 376 ":container_memory", 377 ":flat_hash_map", 378 ":flat_hash_set", 379 ":hash_function_defaults", 380 ":hash_policy_testing", 381 ":hashtable_debug", 382 ":hashtablez_sampler", 383 ":raw_hash_set", 384 ":test_allocator", 385 "//third_party/abseil-cpp/absl/base", 386 "//third_party/abseil-cpp/absl/base:config", 387 "//third_party/abseil-cpp/absl/base:core_headers", 388 "//third_party/abseil-cpp/absl/base:prefetch", 389 "//third_party/abseil-cpp/absl/functional:function_ref", 390 "//third_party/abseil-cpp/absl/hash", 391 "//third_party/abseil-cpp/absl/log", 392 "//third_party/abseil-cpp/absl/log:check", 393 "//third_party/abseil-cpp/absl/memory", 394 "//third_party/abseil-cpp/absl/meta:type_traits", 395 "//third_party/abseil-cpp/absl/strings", 396 ] 397} 398 399absl_test("raw_hash_set_allocator_test") { 400 sources = [ "internal/raw_hash_set_allocator_test.cc" ] 401 deps = [ 402 ":container_memory", 403 ":raw_hash_set", 404 ":tracked", 405 "//third_party/abseil-cpp/absl/base:config", 406 ] 407} 408 409absl_source_set("layout") { 410 public = [ "internal/layout.h" ] 411 deps = [ 412 "//third_party/abseil-cpp/absl/base:config", 413 "//third_party/abseil-cpp/absl/base:core_headers", 414 "//third_party/abseil-cpp/absl/debugging:demangle_internal", 415 "//third_party/abseil-cpp/absl/meta:type_traits", 416 "//third_party/abseil-cpp/absl/strings", 417 "//third_party/abseil-cpp/absl/types:span", 418 "//third_party/abseil-cpp/absl/utility", 419 ] 420} 421 422absl_test("layout_test") { 423 sources = [ "internal/layout_test.cc" ] 424 deps = [ 425 ":layout", 426 "//third_party/abseil-cpp/absl/base:config", 427 "//third_party/abseil-cpp/absl/log:check", 428 "//third_party/abseil-cpp/absl/types:span", 429 "//third_party/abseil-cpp/absl/utility", 430 ] 431} 432 433absl_source_set("tracked") { 434 testonly = true 435 public = [ "internal/tracked.h" ] 436 deps = [ "//third_party/abseil-cpp/absl/base:config" ] 437} 438 439absl_source_set("unordered_map_constructor_test") { 440 testonly = true 441 public = [ "internal/unordered_map_constructor_test.h" ] 442 deps = [ 443 ":hash_generator_testing", 444 ":hash_policy_testing", 445 "//third_party/googletest:gtest", 446 ] 447} 448 449absl_source_set("unordered_map_lookup_test") { 450 testonly = true 451 public = [ "internal/unordered_map_lookup_test.h" ] 452 deps = [ 453 ":hash_generator_testing", 454 ":hash_policy_testing", 455 "//third_party/googletest:gtest", 456 ] 457} 458 459absl_source_set("unordered_map_modifiers_test") { 460 testonly = true 461 public = [ "internal/unordered_map_modifiers_test.h" ] 462 deps = [ 463 ":hash_generator_testing", 464 ":hash_policy_testing", 465 "//third_party/googletest:gtest", 466 ] 467} 468 469absl_source_set("unordered_set_constructor_test") { 470 testonly = true 471 public = [ "internal/unordered_set_constructor_test.h" ] 472 deps = [ 473 ":hash_generator_testing", 474 ":hash_policy_testing", 475 "//third_party/abseil-cpp/absl/meta:type_traits", 476 "//third_party/googletest:gtest", 477 ] 478} 479 480absl_source_set("unordered_set_members_test") { 481 testonly = true 482 public = [ "internal/unordered_set_members_test.h" ] 483 deps = [ 484 "//third_party/abseil-cpp/absl/meta:type_traits", 485 "//third_party/googletest:gtest", 486 ] 487} 488 489absl_source_set("unordered_map_members_test") { 490 testonly = true 491 public = [ "internal/unordered_map_members_test.h" ] 492 deps = [ 493 "//third_party/abseil-cpp/absl/meta:type_traits", 494 "//third_party/googletest:gtest", 495 ] 496} 497 498absl_source_set("unordered_set_lookup_test") { 499 testonly = true 500 public = [ "internal/unordered_set_lookup_test.h" ] 501 deps = [ 502 ":hash_generator_testing", 503 ":hash_policy_testing", 504 "//third_party/googletest:gtest", 505 ] 506} 507 508absl_source_set("unordered_set_modifiers_test") { 509 testonly = true 510 public = [ "internal/unordered_set_modifiers_test.h" ] 511 deps = [ 512 ":hash_generator_testing", 513 ":hash_policy_testing", 514 "//third_party/googletest:gtest", 515 ] 516} 517 518absl_test("sample_element_size_test") { 519 public = [ "sample_element_size_test.cc" ] 520 deps = [ 521 ":flat_hash_map", 522 ":flat_hash_set", 523 ":node_hash_map", 524 ":node_hash_set", 525 ] 526} 527 528absl_source_set("btree") { 529 sources = [ 530 "internal/btree.h", 531 "internal/btree_container.h", 532 ] 533 public = [ 534 "btree_map.h", 535 "btree_set.h", 536 ] 537 deps = [ 538 ":common", 539 ":common_policy_traits", 540 ":compressed_tuple", 541 ":container_memory", 542 ":layout", 543 "//third_party/abseil-cpp/absl/base:config", 544 "//third_party/abseil-cpp/absl/base:core_headers", 545 "//third_party/abseil-cpp/absl/base:raw_logging_internal", 546 "//third_party/abseil-cpp/absl/base:throw_delegate", 547 "//third_party/abseil-cpp/absl/memory", 548 "//third_party/abseil-cpp/absl/meta:type_traits", 549 "//third_party/abseil-cpp/absl/strings:cord", 550 "//third_party/abseil-cpp/absl/strings:string_view", 551 "//third_party/abseil-cpp/absl/types:compare", 552 ] 553} 554 555absl_source_set("btree_test_common") { 556 testonly = true 557 public = [ "btree_test.h" ] 558 deps = [ 559 ":btree", 560 ":flat_hash_set", 561 "//third_party/abseil-cpp/absl/strings", 562 "//third_party/abseil-cpp/absl/strings:cord", 563 "//third_party/abseil-cpp/absl/time", 564 ] 565} 566# TODO(mbonadei): Fix issue with EXPECT_DEATH and uncomment. 567# absl_test("btree_test") { 568# sources = [ "btree_test.cc" ] 569# deps = [ 570# ":btree", 571# ":btree_test_common", 572# ":test_allocator", 573# ":test_instance_tracker", 574# "//third_party/abseil-cpp/absl/algorithm:container", 575# "//third_party/abseil-cpp/absl/base:core_headers", 576# "//third_party/abseil-cpp/absl/base:raw_logging_internal", 577# "//third_party/abseil-cpp/absl/flags:flag", 578# "//third_party/abseil-cpp/absl/hash:hash_testing", 579# "//third_party/abseil-cpp/absl/memory", 580# "//third_party/abseil-cpp/absl/random", 581# "//third_party/abseil-cpp/absl/strings", 582# "//third_party/abseil-cpp/absl/types:compare", 583# "//third_party/abseil-cpp/absl/types:optional", 584# ] 585# } 586