• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_source_set("inlined_vector_internal") {
26  public = [ "internal/inlined_vector.h" ]
27  deps = [
28    ":compressed_tuple",
29    "//third_party/abseil-cpp/absl/base:core_headers",
30    "//third_party/abseil-cpp/absl/memory",
31    "//third_party/abseil-cpp/absl/meta:type_traits",
32    "//third_party/abseil-cpp/absl/types:span",
33  ]
34}
35
36absl_source_set("inlined_vector") {
37  public = [ "inlined_vector.h" ]
38  deps = [
39    ":inlined_vector_internal",
40    "//third_party/abseil-cpp/absl/algorithm",
41    "//third_party/abseil-cpp/absl/base:core_headers",
42    "//third_party/abseil-cpp/absl/base:throw_delegate",
43    "//third_party/abseil-cpp/absl/memory",
44    "//third_party/abseil-cpp/absl/meta:type_traits",
45  ]
46}
47
48absl_source_set("counting_allocator") {
49  testonly = true
50  public = [ "internal/counting_allocator.h" ]
51  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
52  visibility = [ ":*" ]
53}
54
55absl_source_set("test_instance_tracker") {
56  testonly = true
57  sources = [ "internal/test_instance_tracker.cc" ]
58  public = [ "internal/test_instance_tracker.h" ]
59  deps = [ "//third_party/abseil-cpp/absl/types:compare" ]
60  visibility = [ "//third_party/abseil-cpp/absl/*" ]
61}
62
63absl_source_set("flat_hash_map") {
64  public = [ "flat_hash_map.h" ]
65  deps = [
66    ":container_memory",
67    ":hash_function_defaults",
68    ":raw_hash_map",
69    "//third_party/abseil-cpp/absl/algorithm:container",
70    "//third_party/abseil-cpp/absl/base:core_headers",
71    "//third_party/abseil-cpp/absl/memory",
72  ]
73}
74
75absl_source_set("flat_hash_set") {
76  public = [ "flat_hash_set.h" ]
77  deps = [
78    ":container_memory",
79    ":hash_function_defaults",
80    ":raw_hash_set",
81    "//third_party/abseil-cpp/absl/algorithm:container",
82    "//third_party/abseil-cpp/absl/base:core_headers",
83    "//third_party/abseil-cpp/absl/memory",
84  ]
85}
86
87absl_source_set("node_hash_map") {
88  public = [ "node_hash_map.h" ]
89  deps = [
90    ":container_memory",
91    ":hash_function_defaults",
92    ":node_slot_policy",
93    ":raw_hash_map",
94    "//third_party/abseil-cpp/absl/algorithm:container",
95    "//third_party/abseil-cpp/absl/base:core_headers",
96    "//third_party/abseil-cpp/absl/memory",
97  ]
98}
99
100absl_source_set("node_hash_set") {
101  public = [ "node_hash_set.h" ]
102  deps = [
103    ":container_memory",
104    ":hash_function_defaults",
105    ":node_slot_policy",
106    ":raw_hash_set",
107    "//third_party/abseil-cpp/absl/algorithm:container",
108    "//third_party/abseil-cpp/absl/base:core_headers",
109    "//third_party/abseil-cpp/absl/memory",
110  ]
111}
112
113absl_source_set("container_memory") {
114  public = [ "internal/container_memory.h" ]
115  deps = [
116    "//third_party/abseil-cpp/absl/base:config",
117    "//third_party/abseil-cpp/absl/memory",
118    "//third_party/abseil-cpp/absl/meta:type_traits",
119    "//third_party/abseil-cpp/absl/utility",
120  ]
121}
122
123absl_source_set("hash_function_defaults") {
124  public = [ "internal/hash_function_defaults.h" ]
125  visibility = [ "//third_party/abseil-cpp/absl/container:*" ]
126  deps = [
127    "//third_party/abseil-cpp/absl/base:config",
128    "//third_party/abseil-cpp/absl/hash",
129    "//third_party/abseil-cpp/absl/strings",
130    "//third_party/abseil-cpp/absl/strings:cord",
131  ]
132}
133
134absl_source_set("hash_generator_testing") {
135  testonly = true
136  sources = [ "internal/hash_generator_testing.cc" ]
137  public = [ "internal/hash_generator_testing.h" ]
138  deps = [
139    ":hash_policy_testing",
140    "//third_party/abseil-cpp/absl/memory",
141    "//third_party/abseil-cpp/absl/meta:type_traits",
142    "//third_party/abseil-cpp/absl/strings",
143  ]
144}
145
146absl_source_set("hash_policy_testing") {
147  testonly = true
148  public = [ "internal/hash_policy_testing.h" ]
149  deps = [
150    "//third_party/abseil-cpp/absl/hash",
151    "//third_party/abseil-cpp/absl/strings",
152  ]
153}
154
155absl_source_set("hash_policy_traits") {
156  public = [ "internal/hash_policy_traits.h" ]
157  deps = [
158    ":common_policy_traits",
159    "//third_party/abseil-cpp/absl/meta:type_traits",
160  ]
161}
162
163absl_source_set("common_policy_traits") {
164  public = [ "internal/common_policy_traits.h" ]
165  visibility = [ "//third_party/abseil-cpp/absl/container:*" ]
166  deps = [ "//third_party/abseil-cpp/absl/meta:type_traits" ]
167}
168
169absl_test("common_policy_traits_test") {
170  sources = [ "internal/common_policy_traits_test.cc" ]
171  deps = [ ":common_policy_traits" ]
172}
173
174absl_source_set("hashtable_debug") {
175  public = [ "internal/hashtable_debug.h" ]
176  deps = [ ":hashtable_debug_hooks" ]
177}
178
179absl_source_set("hashtable_debug_hooks") {
180  public = [ "internal/hashtable_debug_hooks.h" ]
181  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
182}
183
184absl_source_set("hashtablez_sampler") {
185  public = [ "internal/hashtablez_sampler.h" ]
186  sources = [
187    "internal/hashtablez_sampler.cc",
188    "internal/hashtablez_sampler_force_weak_definition.cc",
189  ]
190  deps = [
191    "//third_party/abseil-cpp/absl/base",
192    "//third_party/abseil-cpp/absl/base:config",
193    "//third_party/abseil-cpp/absl/base:core_headers",
194    "//third_party/abseil-cpp/absl/base:raw_logging_internal",
195    "//third_party/abseil-cpp/absl/debugging:stacktrace",
196    "//third_party/abseil-cpp/absl/memory",
197    "//third_party/abseil-cpp/absl/profiling:exponential_biased",
198    "//third_party/abseil-cpp/absl/profiling:sample_recorder",
199    "//third_party/abseil-cpp/absl/synchronization",
200    "//third_party/abseil-cpp/absl/time",
201    "//third_party/abseil-cpp/absl/utility",
202  ]
203}
204
205absl_source_set("node_slot_policy") {
206  public = [ "internal/node_slot_policy.h" ]
207  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
208}
209
210absl_test("node_slot_policy_test") {
211  sources = [ "internal/node_slot_policy_test.cc" ]
212  deps = [
213    ":hash_policy_traits",
214    ":node_slot_policy",
215  ]
216}
217
218absl_source_set("raw_hash_map") {
219  public = [ "internal/raw_hash_map.h" ]
220  deps = [
221    ":container_memory",
222    ":raw_hash_set",
223    "//third_party/abseil-cpp/absl/base:throw_delegate",
224  ]
225}
226
227absl_source_set("common") {
228  public = [ "internal/common.h" ]
229  deps = [
230    "//third_party/abseil-cpp/absl/meta:type_traits",
231    "//third_party/abseil-cpp/absl/types:optional",
232  ]
233}
234
235absl_source_set("raw_hash_set") {
236  sources = [ "internal/raw_hash_set.cc" ]
237  public = [ "internal/raw_hash_set.h" ]
238  deps = [
239    ":common",
240    ":compressed_tuple",
241    ":container_memory",
242    ":hash_policy_traits",
243    ":hashtable_debug_hooks",
244    ":hashtablez_sampler",
245    "//third_party/abseil-cpp/absl/base:config",
246    "//third_party/abseil-cpp/absl/base:core_headers",
247    "//third_party/abseil-cpp/absl/base:dynamic_annotations",
248    "//third_party/abseil-cpp/absl/base:endian",
249    "//third_party/abseil-cpp/absl/base:prefetch",
250    "//third_party/abseil-cpp/absl/base:raw_logging_internal",
251    "//third_party/abseil-cpp/absl/hash",
252    "//third_party/abseil-cpp/absl/memory",
253    "//third_party/abseil-cpp/absl/meta:type_traits",
254    "//third_party/abseil-cpp/absl/numeric:bits",
255    "//third_party/abseil-cpp/absl/utility",
256  ]
257}
258
259absl_source_set("layout") {
260  public = [ "internal/layout.h" ]
261  deps = [
262    "//third_party/abseil-cpp/absl/base:config",
263    "//third_party/abseil-cpp/absl/base:core_headers",
264    "//third_party/abseil-cpp/absl/meta:type_traits",
265    "//third_party/abseil-cpp/absl/strings",
266    "//third_party/abseil-cpp/absl/types:span",
267    "//third_party/abseil-cpp/absl/utility",
268  ]
269}
270
271absl_source_set("tracked") {
272  testonly = true
273  public = [ "internal/tracked.h" ]
274  deps = [ "//third_party/abseil-cpp/absl/base:config" ]
275}
276
277absl_source_set("unordered_map_constructor_test") {
278  testonly = true
279  public = [ "internal/unordered_map_constructor_test.h" ]
280  deps = [
281    ":hash_generator_testing",
282    ":hash_policy_testing",
283    "//third_party/googletest:gtest",
284  ]
285}
286
287absl_source_set("unordered_map_lookup_test") {
288  testonly = true
289  public = [ "internal/unordered_map_lookup_test.h" ]
290  deps = [
291    ":hash_generator_testing",
292    ":hash_policy_testing",
293    "//third_party/googletest:gtest",
294  ]
295}
296
297absl_source_set("unordered_map_modifiers_test") {
298  testonly = true
299  public = [ "internal/unordered_map_modifiers_test.h" ]
300  deps = [
301    ":hash_generator_testing",
302    ":hash_policy_testing",
303    "//third_party/googletest:gtest",
304  ]
305}
306
307absl_source_set("unordered_set_constructor_test") {
308  testonly = true
309  public = [ "internal/unordered_set_constructor_test.h" ]
310  deps = [
311    ":hash_generator_testing",
312    ":hash_policy_testing",
313    "//third_party/abseil-cpp/absl/meta:type_traits",
314    "//third_party/googletest:gtest",
315  ]
316}
317
318absl_source_set("unordered_set_members_test") {
319  testonly = true
320  public = [ "internal/unordered_set_members_test.h" ]
321  deps = [
322    "//third_party/abseil-cpp/absl/meta:type_traits",
323    "//third_party/googletest:gtest",
324  ]
325}
326
327absl_source_set("unordered_map_members_test") {
328  testonly = true
329  public = [ "internal/unordered_map_members_test.h" ]
330  deps = [
331    "//third_party/abseil-cpp/absl/meta:type_traits",
332    "//third_party/googletest:gtest",
333  ]
334}
335
336absl_source_set("unordered_set_lookup_test") {
337  testonly = true
338  public = [ "internal/unordered_set_lookup_test.h" ]
339  deps = [
340    ":hash_generator_testing",
341    ":hash_policy_testing",
342    "//third_party/googletest:gtest",
343  ]
344}
345
346absl_source_set("unordered_set_modifiers_test") {
347  testonly = true
348  public = [ "internal/unordered_set_modifiers_test.h" ]
349  deps = [
350    ":hash_generator_testing",
351    ":hash_policy_testing",
352    "//third_party/googletest:gtest",
353  ]
354}
355
356absl_test("sample_element_size_test") {
357  public = [ "sample_element_size_test.cc" ]
358  deps = [
359    ":flat_hash_map",
360    ":flat_hash_set",
361    ":node_hash_map",
362    ":node_hash_set",
363  ]
364}
365
366absl_source_set("btree") {
367  sources = [
368    "internal/btree.h",
369    "internal/btree_container.h",
370  ]
371  public = [
372    "btree_map.h",
373    "btree_set.h",
374  ]
375  deps = [
376    ":common",
377    ":common_policy_traits",
378    ":compressed_tuple",
379    ":container_memory",
380    ":layout",
381    "//third_party/abseil-cpp/absl/base:core_headers",
382    "//third_party/abseil-cpp/absl/base:raw_logging_internal",
383    "//third_party/abseil-cpp/absl/base:throw_delegate",
384    "//third_party/abseil-cpp/absl/memory",
385    "//third_party/abseil-cpp/absl/meta:type_traits",
386    "//third_party/abseil-cpp/absl/strings",
387    "//third_party/abseil-cpp/absl/strings:cord",
388    "//third_party/abseil-cpp/absl/types:compare",
389    "//third_party/abseil-cpp/absl/utility",
390  ]
391}
392
393absl_source_set("btree_test_common") {
394  testonly = true
395  public = [
396    "btree_test.h",
397  ]
398  deps = [
399    ":btree",
400    ":flat_hash_set",
401    "//third_party/abseil-cpp/absl/strings",
402    "//third_party/abseil-cpp/absl/strings:cord",
403    "//third_party/abseil-cpp/absl/time",
404  ]
405}
406
407absl_test("inlined_vector_test") {
408  sources = [ "inlined_vector_test.cc" ]
409  deps = [
410    ":counting_allocator",
411    ":inlined_vector",
412    ":test_instance_tracker",
413    "//third_party/abseil-cpp/absl/base:config",
414    "//third_party/abseil-cpp/absl/base:core_headers",
415    "//third_party/abseil-cpp/absl/base:exception_testing",
416    "//third_party/abseil-cpp/absl/base:raw_logging_internal",
417    "//third_party/abseil-cpp/absl/hash:hash_testing",
418    "//third_party/abseil-cpp/absl/memory",
419    "//third_party/abseil-cpp/absl/strings",
420  ]
421}
422
423# TODO(mbonadei): Fix issue with EXPECT_DEATH and uncomment.
424# absl_test("btree_test") {
425#   sources = [ "btree_test.cc" ]
426#   deps = [
427#     ":btree",
428#     ":btree_test_common",
429#     ":counting_allocator",
430#     ":test_instance_tracker",
431#     "//third_party/abseil-cpp/absl/algorithm:container",
432#     "//third_party/abseil-cpp/absl/base:core_headers",
433#     "//third_party/abseil-cpp/absl/base:raw_logging_internal",
434#     "//third_party/abseil-cpp/absl/flags:flag",
435#     "//third_party/abseil-cpp/absl/hash:hash_testing",
436#     "//third_party/abseil-cpp/absl/memory",
437#     "//third_party/abseil-cpp/absl/random",
438#     "//third_party/abseil-cpp/absl/strings",
439#     "//third_party/abseil-cpp/absl/types:compare",
440#     "//third_party/abseil-cpp/absl/types:optional",
441#   ]
442# }
443