[OpenACC] Enable 'attach' clause for combined constructs
[llvm-project.git] / libc / src / pthread / CMakeLists.txt
blobc8c66805667fa9b77a444278fa7be0e0d25c4091
1 add_entrypoint_object(
2   pthread_attr_init
3   SRCS
4     pthread_attr_init.cpp
5   HDRS
6     pthread_attr_init.h
7   DEPENDS
8     libc.include.pthread
11 add_entrypoint_object(
12   pthread_attr_destroy
13   SRCS
14     pthread_attr_destroy.cpp
15   HDRS
16     pthread_attr_destroy.h
17   DEPENDS
18     libc.include.pthread
21 add_entrypoint_object(
22   pthread_attr_getdetachstate
23   SRCS
24     pthread_attr_getdetachstate.cpp
25   HDRS
26     pthread_attr_getdetachstate.h
27   DEPENDS
28     libc.include.pthread
31 add_entrypoint_object(
32   pthread_attr_setdetachstate
33   SRCS
34     pthread_attr_setdetachstate.cpp
35   HDRS
36     pthread_attr_setdetachstate.h
37   DEPENDS
38     libc.include.pthread
39     libc.src.errno.errno
42 add_entrypoint_object(
43   pthread_attr_getguardsize
44   SRCS
45     pthread_attr_getguardsize.cpp
46   HDRS
47     pthread_attr_getguardsize.h
48   DEPENDS
49     libc.include.pthread
52 add_entrypoint_object(
53   pthread_attr_setguardsize
54   SRCS
55     pthread_attr_setguardsize.cpp
56   HDRS
57     pthread_attr_setguardsize.h
58   DEPENDS
59     libc.include.pthread
60     libc.src.errno.errno
63 add_entrypoint_object(
64   pthread_attr_getstacksize
65   SRCS
66     pthread_attr_getstacksize.cpp
67   HDRS
68     pthread_attr_getstacksize.h
69   DEPENDS
70     libc.include.pthread
73 add_entrypoint_object(
74   pthread_attr_setstacksize
75   SRCS
76     pthread_attr_setstacksize.cpp
77   HDRS
78     pthread_attr_setstacksize.h
79   DEPENDS
80     libc.include.pthread
81     libc.src.errno.errno
84 add_entrypoint_object(
85   pthread_attr_getstack
86   SRCS
87     pthread_attr_getstack.cpp
88   HDRS
89     pthread_attr_getstack.h
90   DEPENDS
91     libc.include.pthread
92     libc.src.pthread.pthread_attr_getstacksize
95 add_entrypoint_object(
96   pthread_attr_setstack
97   SRCS
98     pthread_attr_setstack.cpp
99   HDRS
100     pthread_attr_setstack.h
101   DEPENDS
102     libc.include.pthread
103     libc.src.pthread.pthread_attr_setstacksize
104     libc.src.errno.errno
107 add_entrypoint_object(
108   pthread_condattr_destroy
109   SRCS
110     pthread_condattr_destroy.cpp
111   HDRS
112     pthread_condattr_destroy.h
113   DEPENDS
114     libc.include.pthread
117 add_entrypoint_object(
118   pthread_condattr_getclock
119   SRCS
120     pthread_condattr_getclock.cpp
121   HDRS
122     pthread_condattr_getclock.h
123   DEPENDS
124     libc.include.pthread
125     libc.include.sys_types
128 add_entrypoint_object(
129   pthread_condattr_getpshared
130   SRCS
131     pthread_condattr_getpshared.cpp
132   HDRS
133     pthread_condattr_getpshared.h
134   DEPENDS
135     libc.include.pthread
138 add_entrypoint_object(
139   pthread_condattr_init
140   SRCS
141     pthread_condattr_init.cpp
142   HDRS
143     pthread_condattr_init.h
144   DEPENDS
145     libc.include.pthread
146     libc.include.time
149 add_entrypoint_object(
150   pthread_condattr_setclock
151   SRCS
152     pthread_condattr_setclock.cpp
153   HDRS
154     pthread_condattr_setclock.h
155   DEPENDS
156     libc.include.pthread
157     libc.include.sys_types
158     libc.include.time
159     libc.src.errno.errno
162 add_entrypoint_object(
163   pthread_condattr_setpshared
164   SRCS
165     pthread_condattr_setpshared.cpp
166   HDRS
167     pthread_condattr_setpshared.h
168   DEPENDS
169     libc.include.pthread
170     libc.src.errno.errno
173 add_header_library(
174   pthread_mutexattr
175   HDRS
176     pthread_mutexattr.h
177   DEPENDS
178     libc.src.__support.common
179     libc.include.pthread
182 add_entrypoint_object(
183   pthread_mutexattr_init
184   SRCS
185     pthread_mutexattr_init.cpp
186   HDRS
187     pthread_mutexattr_init.h
188   DEPENDS
189     .pthread_mutexattr
190     libc.include.pthread
193 add_entrypoint_object(
194   pthread_mutexattr_gettype
195   SRCS
196     pthread_mutexattr_gettype.cpp
197   HDRS
198     pthread_mutexattr_gettype.h
199   DEPENDS
200     .pthread_mutexattr
201     libc.include.pthread
204 add_entrypoint_object(
205   pthread_mutexattr_settype
206   SRCS
207     pthread_mutexattr_settype.cpp
208   HDRS
209     pthread_mutexattr_settype.h
210   DEPENDS
211     .pthread_mutexattr
212     libc.include.pthread
213     libc.src.errno.errno
216 add_entrypoint_object(
217   pthread_mutexattr_destroy
218   SRCS
219     pthread_mutexattr_destroy.cpp
220   HDRS
221     pthread_mutexattr_destroy.h
222   DEPENDS
223     .pthread_mutexattr
224     libc.src.errno.errno
225     libc.include.pthread
228 add_entrypoint_object(
229   pthread_mutexattr_getrobust
230   SRCS
231     pthread_mutexattr_getrobust.cpp
232   HDRS
233     pthread_mutexattr_getrobust.h
234   DEPENDS
235     .pthread_mutexattr
236     libc.include.pthread
239 add_entrypoint_object(
240   pthread_mutexattr_setrobust
241   SRCS
242     pthread_mutexattr_setrobust.cpp
243   HDRS
244     pthread_mutexattr_setrobust.h
245   DEPENDS
246     .pthread_mutexattr
247     libc.include.pthread
248     libc.src.errno.errno
251 add_entrypoint_object(
252   pthread_mutexattr_getpshared
253   SRCS
254     pthread_mutexattr_getpshared.cpp
255   HDRS
256     pthread_mutexattr_getpshared.h
257   DEPENDS
258     .pthread_mutexattr
259     libc.include.pthread
262 add_entrypoint_object(
263   pthread_mutexattr_setpshared
264   SRCS
265     pthread_mutexattr_setpshared.cpp
266   HDRS
267     pthread_mutexattr_setpshared.h
268   DEPENDS
269     .pthread_mutexattr
270     libc.include.pthread
271     libc.src.errno.errno
274 add_entrypoint_object(
275   pthread_mutex_init
276   SRCS
277     pthread_mutex_init.cpp
278   HDRS
279     pthread_mutex_init.h
280   DEPENDS
281     .pthread_mutexattr
282     libc.src.errno.errno
283     libc.include.pthread
284     libc.src.__support.threads.mutex
287 add_entrypoint_object(
288   pthread_mutex_destroy
289   SRCS
290     pthread_mutex_destroy.cpp
291   HDRS
292     pthread_mutex_destroy.h
293   DEPENDS
294     libc.include.pthread
295     libc.src.__support.threads.mutex
298 add_entrypoint_object(
299   pthread_mutex_lock
300   SRCS
301     pthread_mutex_lock.cpp
302   HDRS
303     pthread_mutex_lock.h
304   DEPENDS
305     libc.include.pthread
306     libc.src.__support.threads.mutex
309 add_entrypoint_object(
310   pthread_mutex_unlock
311   SRCS
312     pthread_mutex_unlock.cpp
313   HDRS
314     pthread_mutex_unlock.h
315   DEPENDS
316     libc.include.pthread
317     libc.src.__support.threads.mutex
320 add_entrypoint_object(
321   pthread_create
322   SRCS
323     pthread_create.cpp
324   HDRS
325     pthread_create.h
326   DEPENDS
327     libc.include.pthread
328     libc.src.__support.threads.thread
329     libc.src.pthread.pthread_attr_destroy
330     libc.src.pthread.pthread_attr_init
331     libc.src.pthread.pthread_attr_getdetachstate
332     libc.src.pthread.pthread_attr_getguardsize
333     libc.src.pthread.pthread_attr_getstack
334     libc.src.errno.errno
335   COMPILE_OPTIONS
336     ${libc_opt_high_flag}
337     -fno-omit-frame-pointer
340 add_entrypoint_object(
341   pthread_join
342   SRCS
343     pthread_join.cpp
344   HDRS
345     pthread_join.h
346   DEPENDS
347     libc.include.pthread
348     libc.src.__support.threads.thread
351 add_entrypoint_object(
352   pthread_detach
353   SRCS
354     pthread_detach.cpp
355   HDRS
356     pthread_detach.h
357   DEPENDS
358     libc.include.pthread
359     libc.src.__support.threads.thread
362 add_entrypoint_object(
363   pthread_equal
364   SRCS
365     pthread_equal.cpp
366   HDRS
367     pthread_equal.h
368   DEPENDS
369     libc.include.pthread
370     libc.src.__support.threads.thread
373 add_entrypoint_object(
374   pthread_exit
375   SRCS
376     pthread_exit.cpp
377   HDRS
378     pthread_exit.h
379   DEPENDS
380     libc.include.pthread
381     libc.src.__support.threads.thread
384 add_entrypoint_object(
385   pthread_self
386   SRCS
387     pthread_self.cpp
388   HDRS
389     pthread_self.h
390   DEPENDS
391     libc.include.pthread
392     libc.src.__support.threads.thread
395 add_entrypoint_object(
396   pthread_setname_np
397   SRCS
398     pthread_setname_np.cpp
399   HDRS
400     pthread_setname_np.h
401   DEPENDS
402     libc.include.pthread
403     libc.src.__support.CPP.span
404     libc.src.__support.CPP.stringstream
405     libc.src.__support.threads.thread
408 add_entrypoint_object(
409   pthread_getname_np
410   SRCS
411     pthread_getname_np.cpp
412   HDRS
413     pthread_getname_np.h
414   DEPENDS
415     libc.include.pthread
416     libc.src.__support.CPP.span
417     libc.src.__support.CPP.stringstream
418     libc.src.__support.threads.thread
421 add_entrypoint_object(
422   pthread_key_create
423   SRCS
424     pthread_key_create.cpp
425   HDRS
426     pthread_key_create.h
427   DEPENDS
428     libc.include.pthread
429     libc.src.__support.threads.thread
430     libc.src.errno.errno
433 add_entrypoint_object(
434   pthread_key_delete
435   SRCS
436     pthread_key_delete.cpp
437   HDRS
438     pthread_key_delete.h
439   DEPENDS
440     libc.include.pthread
441     libc.src.__support.threads.thread
442     libc.src.errno.errno
445 add_entrypoint_object(
446   pthread_getspecific
447   SRCS
448     pthread_getspecific.cpp
449   HDRS
450     pthread_getspecific.h
451   DEPENDS
452     libc.include.pthread
453     libc.src.errno.errno
454     libc.src.__support.threads.thread
457 add_entrypoint_object(
458   pthread_setspecific
459   SRCS
460     pthread_setspecific.cpp
461   HDRS
462     pthread_setspecific.h
463   DEPENDS
464     libc.include.pthread
465     libc.src.__support.threads.thread
466     libc.src.errno.errno
469 add_entrypoint_object(
470   pthread_rwlockattr_destroy
471   SRCS
472     pthread_rwlockattr_destroy.cpp
473   HDRS
474     pthread_rwlockattr_destroy.h
475   DEPENDS
476     libc.include.pthread
479 add_entrypoint_object(
480   pthread_rwlockattr_getkind_np
481   SRCS
482     pthread_rwlockattr_getkind_np.cpp
483   HDRS
484     pthread_rwlockattr_getkind_np.h
485   DEPENDS
486     libc.include.pthread
489 add_entrypoint_object(
490   pthread_rwlockattr_getpshared
491   SRCS
492     pthread_rwlockattr_getpshared.cpp
493   HDRS
494     pthread_rwlockattr_getpshared.h
495   DEPENDS
496     libc.include.pthread
499 add_entrypoint_object(
500   pthread_rwlockattr_init
501   SRCS
502     pthread_rwlockattr_init.cpp
503   HDRS
504     pthread_rwlockattr_init.h
505   DEPENDS
506     libc.include.pthread
509 add_entrypoint_object(
510   pthread_rwlockattr_setkind_np
511   SRCS
512     pthread_rwlockattr_setkind_np.cpp
513   HDRS
514     pthread_rwlockattr_setkind_np.h
515   DEPENDS
516     libc.include.pthread
517     libc.src.errno.errno
520 add_entrypoint_object(
521   pthread_rwlockattr_setpshared
522   SRCS
523     pthread_rwlockattr_setpshared.cpp
524   HDRS
525     pthread_rwlockattr_setpshared.h
526   DEPENDS
527     libc.include.pthread
528     libc.src.errno.errno
531 add_entrypoint_object(
532   pthread_rwlock_init
533   SRCS
534     pthread_rwlock_init.cpp
535   HDRS
536     pthread_rwlock_init.h
537   DEPENDS
538     libc.include.pthread
539     libc.src.__support.threads.linux.rwlock
540     libc.src.__support.CPP.new
543 add_entrypoint_object(
544   pthread_rwlock_tryrdlock
545   SRCS
546     pthread_rwlock_tryrdlock.cpp
547   HDRS
548     pthread_rwlock_tryrdlock.h
549   DEPENDS
550     libc.include.pthread
551     libc.src.__support.threads.linux.rwlock
554 add_entrypoint_object(
555   pthread_rwlock_trywrlock
556   SRCS
557     pthread_rwlock_trywrlock.cpp
558   HDRS
559     pthread_rwlock_trywrlock.h
560   DEPENDS
561     libc.include.pthread
562     libc.src.__support.threads.linux.rwlock
563     libc.src.errno.errno
566 add_entrypoint_object(
567   pthread_rwlock_clockrdlock
568   SRCS
569     pthread_rwlock_clockrdlock.cpp
570   HDRS
571     pthread_rwlock_clockrdlock.h
572   DEPENDS
573     libc.include.pthread
574     libc.src.__support.threads.linux.rwlock
577 add_entrypoint_object(
578   pthread_rwlock_clockwrlock
579   SRCS
580     pthread_rwlock_clockwrlock.cpp
581   HDRS
582     pthread_rwlock_clockwrlock.h
583   DEPENDS
584     libc.include.pthread
585     libc.src.__support.threads.linux.rwlock
588 add_entrypoint_object(
589   pthread_rwlock_timedrdlock
590   SRCS
591     pthread_rwlock_timedrdlock.cpp
592   HDRS
593     pthread_rwlock_timedrdlock.h
594   DEPENDS
595     libc.include.pthread
596     libc.src.__support.threads.linux.rwlock
597     libc.src.errno.errno
600 add_entrypoint_object(
601   pthread_rwlock_timedwrlock
602   SRCS
603     pthread_rwlock_timedwrlock.cpp
604   HDRS
605     pthread_rwlock_timedwrlock.h
606   DEPENDS
607     libc.include.pthread
608     libc.src.__support.threads.linux.rwlock
611 add_entrypoint_object(
612   pthread_rwlock_rdlock
613   SRCS
614     pthread_rwlock_rdlock.cpp
615   HDRS
616     pthread_rwlock_rdlock.h
617   DEPENDS
618     libc.include.pthread
619     libc.src.__support.threads.linux.rwlock
622 add_entrypoint_object(
623   pthread_rwlock_wrlock
624   SRCS
625     pthread_rwlock_wrlock.cpp
626   HDRS
627     pthread_rwlock_wrlock.h
628   DEPENDS
629     libc.include.pthread
630     libc.src.__support.threads.linux.rwlock
633 add_entrypoint_object(
634   pthread_rwlock_unlock
635   SRCS
636     pthread_rwlock_unlock.cpp
637   HDRS
638     pthread_rwlock_unlock.h
639   DEPENDS
640     libc.include.pthread
641     libc.src.__support.threads.linux.rwlock
642     libc.src.errno.errno
645 add_entrypoint_object(
646   pthread_rwlock_destroy
647   SRCS
648     pthread_rwlock_destroy.cpp
649   HDRS
650     pthread_rwlock_destroy.h
651   DEPENDS
652     libc.include.pthread
653     libc.src.__support.threads.linux.rwlock
656 add_entrypoint_object(
657   pthread_spin_init
658   SRCS
659     pthread_spin_init.cpp
660   HDRS
661     pthread_spin_init.h
662   DEPENDS
663     libc.include.pthread
664     libc.src.__support.threads.spin_lock
665     libc.src.__support.threads.identifier
666     libc.hdr.errno_macros
669 add_entrypoint_object(
670   pthread_spin_destroy
671   SRCS
672     pthread_spin_destroy.cpp
673   HDRS
674     pthread_spin_destroy.h
675   DEPENDS
676     libc.include.pthread
677     libc.src.__support.threads.spin_lock
678     libc.src.__support.threads.identifier
679     libc.hdr.errno_macros
682 add_entrypoint_object(
683   pthread_spin_lock
684   SRCS
685     pthread_spin_lock.cpp
686   HDRS
687     pthread_spin_lock.h
688   DEPENDS
689     libc.include.pthread
690     libc.src.__support.threads.spin_lock
691     libc.src.__support.threads.identifier
692     libc.hdr.errno_macros
695 add_entrypoint_object(
696   pthread_spin_trylock
697   SRCS
698     pthread_spin_trylock.cpp
699   HDRS
700     pthread_spin_trylock.h
701   DEPENDS
702     libc.include.pthread
703     libc.src.__support.threads.spin_lock
704     libc.src.__support.threads.identifier
705     libc.hdr.errno_macros
708 add_entrypoint_object(
709   pthread_spin_unlock
710   SRCS
711     pthread_spin_unlock.cpp
712   HDRS
713     pthread_spin_unlock.h
714   DEPENDS
715     libc.include.pthread
716     libc.src.__support.threads.spin_lock
717     libc.src.__support.threads.identifier
718     libc.hdr.errno_macros
721 add_entrypoint_object(
722   pthread_once
723   SRCS
724     pthread_once.cpp
725   HDRS
726     pthread_once.h
727   DEPENDS
728     libc.include.pthread
729     libc.src.__support.threads.callonce
732 add_entrypoint_object(
733   pthread_atfork
734   SRCS
735     pthread_atfork.cpp
736   HDRS
737     pthread_atfork.h
738   DEPENDS
739     libc.include.pthread
740     libc.src.__support.threads.fork_callbacks
741     libc.src.errno.errno