xref: /llvm-project/libc/src/__support/CMakeLists.txt (revision 7f37b34d31914120a5bb6bd341e7616773df7613)
1add_subdirectory(CPP)
2add_subdirectory(macros)
3
4add_header_library(
5  block
6  HDRS
7    block.h
8  DEPENDS
9    libc.src.__support.CPP.algorithm
10    libc.src.__support.CPP.limits
11    libc.src.__support.CPP.new
12    libc.src.__support.CPP.optional
13    libc.src.__support.CPP.span
14    libc.src.__support.CPP.type_traits
15    libc.src.__support.math_extras
16)
17
18add_object_library(
19  freelist
20  HDRS
21    freelist.h
22  SRCS
23    freelist.cpp
24  DEPENDS
25    .block
26    libc.src.__support.fixedvector
27    libc.src.__support.CPP.array
28    libc.src.__support.CPP.cstddef
29    libc.src.__support.CPP.new
30    libc.src.__support.CPP.span
31)
32
33add_object_library(
34  freetrie
35  HDRS
36    freetrie.h
37  SRCS
38    freetrie.cpp
39  DEPENDS
40    .block
41    .freelist
42)
43
44add_header_library(
45  freestore
46  HDRS
47    freestore.h
48  DEPENDS
49    .freetrie
50)
51
52add_object_library(
53  freelist_heap
54  SRCS
55    freelist_heap.cpp
56  HDRS
57    freelist_heap.h
58  COMPILE_OPTIONS
59    -DLIBC_FREELIST_MALLOC_SIZE=${LIBC_CONF_FREELIST_MALLOC_BUFFER_SIZE}
60  DEPENDS
61    .block
62    .freelist
63    .freestore
64    .freetrie
65    libc.src.__support.CPP.cstddef
66    libc.src.__support.CPP.array
67    libc.src.__support.CPP.optional
68    libc.src.__support.CPP.span
69    libc.src.__support.libc_assert
70    libc.src.string.memory_utils.inline_memcpy
71    libc.src.string.memory_utils.inline_memset
72)
73
74add_header_library(
75  blockstore
76  HDRS
77    blockstore.h
78  DEPENDS
79    .libc_assert
80    libc.src.__support.CPP.new
81)
82
83add_header_library(
84  common
85  HDRS
86    common.h
87    endian_internal.h
88    macros/properties/architectures.h
89    macros/attributes.h
90    macros/properties/cpu_features.h
91)
92
93add_header_library(
94  bit
95  HDRS
96    bit.h
97  DEPENDS
98    libc.src.__support.macros.attributes
99    libc.src.__support.CPP.type_traits
100)
101
102add_header_library(
103  math_extras
104  HDRS
105    math_extras.h
106  DEPENDS
107    libc.src.__support.CPP.bit
108    libc.src.__support.CPP.limits
109    libc.src.__support.CPP.type_traits
110    libc.src.__support.macros.attributes
111    libc.src.__support.macros.config
112)
113
114add_header_library(
115  sign
116  HDRS
117    sign.h
118  DEPENDS
119    libc.src.__support.macros.attributes
120)
121
122add_header_library(
123  error_or
124  HDRS
125    error_or.h
126  DEPENDS
127    libc.src.__support.CPP.expected
128)
129
130add_header_library(
131  c_string
132  HDRS
133    c_string.h
134  DEPENDS
135    libc.src.__support.common
136    libc.src.__support.CPP.string
137)
138
139add_header_library(
140  ctype_utils
141  HDRS
142    ctype_utils.h
143)
144
145add_header_library(
146  wctype_utils
147  HDRS
148    wctype_utils.h
149  DEPENDS
150    libc.hdr.types.wint_t
151)
152
153add_header_library(
154  str_to_num_result
155  HDRS
156    str_to_num_result.h
157  DEPENDS
158    libc.src.__support.macros.attributes
159)
160
161add_header_library(
162  str_to_integer
163  HDRS
164    str_to_integer.h
165  DEPENDS
166    .ctype_utils
167    .str_to_num_result
168    libc.src.errno.errno
169    libc.src.__support.CPP.limits
170    libc.src.__support.CPP.type_traits
171    libc.src.__support.common
172)
173
174add_header_library(
175  integer_to_string
176  HDRS
177    integer_to_string.h
178  DEPENDS
179    .big_int
180    libc.src.__support.common
181    libc.src.__support.CPP.algorithm
182    libc.src.__support.CPP.limits
183    libc.src.__support.CPP.span
184    libc.src.__support.CPP.string_view
185    libc.src.__support.CPP.type_traits
186)
187
188add_header_library(
189  float_to_string
190  HDRS
191    float_to_string.h
192    ryu_constants.h
193    ryu_long_double_constants.h
194  DEPENDS
195    .libc_assert
196    libc.src.__support.CPP.type_traits
197    libc.src.__support.FPUtil.fp_bits
198    libc.src.__support.common
199)
200
201add_header_library(
202  high_precision_decimal
203  HDRS
204    high_precision_decimal.h
205  DEPENDS
206    .str_to_integer
207)
208
209add_header_library(
210  str_to_float
211  HDRS
212    str_to_float.h
213    detailed_powers_of_ten.h
214  DEPENDS
215    .ctype_utils
216    .high_precision_decimal
217    .str_to_integer
218    .str_to_num_result
219    .uint128
220    libc.src.__support.common
221    libc.src.__support.CPP.bit
222    libc.src.__support.CPP.limits
223    libc.src.__support.CPP.optional
224    libc.src.__support.FPUtil.fp_bits
225    libc.src.__support.FPUtil.rounding_mode
226    libc.src.__support.macros.config
227    libc.src.__support.macros.null_check
228    libc.src.__support.macros.optimization
229    libc.src.errno.errno
230)
231
232add_header_library(
233  integer_literals
234  HDRS
235    integer_literals.h
236  DEPENDS
237    .uint128
238    libc.src.__support.CPP.limits
239)
240
241add_header_library(
242  complex_type
243  HDRS
244    complex_type.h
245  DEPENDS
246    libc.src.__support.macros.properties.types
247    libc.src.__support.macros.properties.complex_types
248)
249
250add_header_library(
251  complex_basic_ops
252  HDRS
253    complex_basic_ops.h
254  DEPENDS
255    .complex_type
256    libc.src.__support.CPP.bit
257    libc.src.__support.FPUtil.fp_bits
258)
259
260add_header_library(
261  integer_operations
262  HDRS
263    integer_operations.h
264)
265
266add_header_library(
267  arg_list
268  HDRS
269    arg_list.h
270  DEPENDS
271    libc.src.__support.common
272)
273
274add_header_library(
275  fixedvector
276  HDRS
277    fixedvector.h
278  DEPENDS
279    .libc_assert
280    libc.src.__support.CPP.array
281    libc.src.string.memory_utils.inline_memset
282)
283
284add_header_library(
285  char_vector
286  HDRS
287    char_vector.h
288  DEPENDS
289    libc.hdr.func.free
290    libc.hdr.func.malloc
291    libc.hdr.func.realloc
292    libc.src.__support.common
293)
294
295add_header_library(
296  number_pair
297  HDRS
298    number_pair.h
299  DEPENDS
300    libc.src.__support.CPP.type_traits
301)
302
303add_header_library(
304  big_int
305  HDRS
306    big_int.h
307  DEPENDS
308    .math_extras
309    .number_pair
310    libc.src.__support.CPP.array
311    libc.src.__support.CPP.bit
312    libc.src.__support.CPP.type_traits
313    libc.src.__support.macros.optimization
314    libc.src.__support.macros.properties.types
315)
316
317add_header_library(
318  uint128
319  HDRS
320    uint128.h
321  DEPENDS
322    .big_int
323    libc.src.__support.macros.properties.types
324)
325
326add_header_library(
327  libc_assert
328  HDRS
329    libc_assert.h
330  DEPENDS
331    .integer_to_string
332    libc.src.__support.OSUtil.osutil
333    libc.src.__support.macros.optimization
334)
335
336add_header_library(
337  hash
338  HDRS
339    hash.h
340  DEPENDS
341    .uint128
342    libc.src.__support.CPP.bit
343    libc.src.__support.CPP.limits
344    libc.src.__support.macros.attributes
345)
346
347add_header_library(
348  memory_size
349  HDRS
350    memory_size.h
351  DEPENDS
352    libc.src.__support.CPP.type_traits
353    libc.src.__support.CPP.limits
354    libc.src.__support.macros.optimization
355    libc.src.__support.macros.attributes
356    libc.src.__support.macros.config
357)
358
359add_header_library(
360  intrusive_list
361  HDRS
362    intrusive_list.h
363  DEPENDS
364    libc.src.__support.macros.attributes
365)
366
367add_subdirectory(FPUtil)
368add_subdirectory(OSUtil)
369add_subdirectory(StringUtil)
370add_subdirectory(GPU)
371add_subdirectory(RPC)
372
373# Thread support is used by other "File". So, we add the "threads"
374# before "File".
375add_subdirectory(threads)
376
377add_subdirectory(File)
378
379add_subdirectory(HashTable)
380
381add_subdirectory(fixed_point)
382
383add_subdirectory(time)
384