[RISCV] Add shrinkwrap test cases showing gaps in current impl
[llvm-project.git] / libc / src / threads / CMakeLists.txt
blob17dea3920a07aaca431804e6c839c00c4347dc78
1 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
2   add_subdirectory(${LIBC_TARGET_OS})
3 endif()
5 add_entrypoint_object(
6   call_once
7   SRCS
8     call_once.cpp
9   HDRS
10     call_once.h
11   DEPENDS
12     libc.include.threads
13     libc.src.__support.threads.callonce
16 add_entrypoint_object(
17   thrd_create
18   SRCS
19     thrd_create.cpp
20   HDRS
21     thrd_create.h
22   DEPENDS
23     libc.src.__support.threads.thread
24     libc.include.threads
25     libc.src.errno.errno
26   COMPILE_OPTIONS
27     ${libc_opt_high_flag}
28     -fno-omit-frame-pointer # This allows us to sniff out the thread args from
29                             # the new thread's stack reliably.
32 add_entrypoint_object(
33   thrd_join
34   SRCS
35     thrd_join.cpp
36   HDRS
37     thrd_join.h
38   DEPENDS
39     libc.include.threads
40     libc.src.__support.threads.thread
43 add_entrypoint_object(
44   thrd_detach
45   SRCS
46     thrd_detach.cpp
47   HDRS
48     thrd_detach.h
49   DEPENDS
50     libc.include.threads
51     libc.src.__support.threads.thread
54 add_entrypoint_object(
55   thrd_current
56   SRCS
57     thrd_current.cpp
58   HDRS
59     thrd_current.h
60   DEPENDS
61     libc.include.threads
62     libc.src.__support.threads.thread
65 add_entrypoint_object(
66   thrd_equal
67   SRCS
68     thrd_equal.cpp
69   HDRS
70     thrd_equal.h
71   DEPENDS
72     libc.include.threads
73     libc.src.__support.threads.thread
76 add_entrypoint_object(
77   thrd_exit
78   SRCS
79     thrd_exit.cpp
80   HDRS
81     thrd_exit.h
82   DEPENDS
83     libc.include.threads
84     libc.src.__support.threads.thread
87 add_entrypoint_object(
88   mtx_init
89   SRCS
90     mtx_init.cpp
91   HDRS
92     mtx_init.h
93   DEPENDS
94     libc.include.threads
95     libc.src.__support.threads.mutex
98 add_entrypoint_object(
99   mtx_destroy
100   SRCS
101     mtx_destroy.cpp
102   HDRS
103     mtx_destroy.h
104   DEPENDS
105     libc.include.threads
106     libc.src.__support.threads.mutex
109 add_entrypoint_object(
110   mtx_lock
111   SRCS
112     mtx_lock.cpp
113   HDRS
114     mtx_lock.h
115   DEPENDS
116     libc.include.threads
117     libc.src.__support.threads.mutex
120 add_entrypoint_object(
121   mtx_unlock
122   SRCS
123     mtx_unlock.cpp
124   HDRS
125     mtx_unlock.h
126   DEPENDS
127     libc.include.threads
128     libc.src.__support.threads.mutex
131 add_entrypoint_object(
132   tss_create
133   SRCS
134     tss_create.cpp
135   HDRS
136     tss_create.h
137   DEPENDS
138     libc.include.threads
139     libc.src.__support.threads.mutex
142 add_entrypoint_object(
143   tss_delete
144   SRCS
145     tss_delete.cpp
146   HDRS
147     tss_delete.h
148   DEPENDS
149     libc.include.threads
150     libc.src.__support.threads.mutex
153 add_entrypoint_object(
154   tss_get
155   SRCS
156     tss_get.cpp
157   HDRS
158     tss_get.h
159   DEPENDS
160     libc.include.threads
161     libc.src.__support.threads.mutex
164 add_entrypoint_object(
165   tss_set
166   SRCS
167     tss_set.cpp
168   HDRS
169     tss_set.h
170   DEPENDS
171     libc.include.threads
172     libc.src.__support.threads.mutex
175 add_entrypoint_object(
176   cnd_init
177   ALIAS
178   DEPENDS
179     .${LIBC_TARGET_OS}.cnd_init
182 add_entrypoint_object(
183   cnd_destroy
184   ALIAS
185   DEPENDS
186     .${LIBC_TARGET_OS}.cnd_destroy
189 add_entrypoint_object(
190   cnd_wait
191   ALIAS
192   DEPENDS
193     .${LIBC_TARGET_OS}.cnd_wait
196 add_entrypoint_object(
197   cnd_signal
198   ALIAS
199   DEPENDS
200     .${LIBC_TARGET_OS}.cnd_signal
203 add_entrypoint_object(
204   cnd_broadcast
205   ALIAS
206   DEPENDS
207     .${LIBC_TARGET_OS}.cnd_broadcast