[LLD][COFF] Emit tail merge pdata for delay load thunks on ARM64EC (#116810)
[llvm-project.git] / libc / hdr / CMakeLists.txt
blob93da271f5e040b9335a8bdb69846814f0cc2c955
1 function(add_proxy_header_library target_name)
2   cmake_parse_arguments(
3     "ADD_PROXY_HEADER"
4     "" # Optional arguments
5     "" # Single value arguments
6     "DEPENDS;FULL_BUILD_DEPENDS" # Multi-value arguments
7     ${ARGN}
8   )
10   set(deps "")
11   if(ADD_PROXY_HEADER_DEPENDS)
12     list(APPEND deps ${ADD_PROXY_HEADER_DEPENDS})
13   endif()
15   if(LLVM_LIBC_FULL_BUILD AND ADD_PROXY_HEADER_FULL_BUILD_DEPENDS)
16     list(APPEND deps ${ADD_PROXY_HEADER_FULL_BUILD_DEPENDS})
17   endif()
19   add_header_library(
20     ${target_name}
21     ${ADD_PROXY_HEADER_UNPARSED_ARGUMENTS}
22     DEPENDS ${deps}
23   )
24 endfunction()
26 add_proxy_header_library(
27   math_macros
28   HDRS
29     math_macros.h
30   FULL_BUILD_DEPENDS
31     libc.include.llvm-libc-macros.math_macros
32     libc.include.math
35 add_proxy_header_library(
36   math_function_macros
37   HDRS
38     math_function_macros.h
39   FULL_BUILD_DEPENDS
40     libc.include.llvm-libc-macros.math_function_macros
41     libc.include.math
44 add_proxy_header_library(
45   errno_macros
46   HDRS
47     errno_macros.h
48   FULL_BUILD_DEPENDS
49     libc.include.errno
50     libc.include.llvm-libc-macros.error_number_macros
51     libc.include.llvm-libc-macros.generic_error_number_macros
54 add_header_library(fcntl_overlay HDRS fcntl_overlay.h)
55 add_proxy_header_library(
56   fcntl_macros
57   HDRS
58     fcntl_macros.h
59   DEPENDS
60     .fcntl_overlay
61   FULL_BUILD_DEPENDS
62     libc.include.llvm-libc-macros.fcntl_macros
63     libc.include.fcntl
66 add_proxy_header_library(
67   fenv_macros
68   HDRS
69     fenv_macros.h
70   FULL_BUILD_DEPENDS
71     libc.include.llvm-libc-macros.fenv_macros
72     libc.include.fenv
75 add_proxy_header_library(
76   signal_macros
77   HDRS
78     signal_macros.h
79   FULL_BUILD_DEPENDS
80     libc.include.llvm-libc-macros.signal_macros
81     libc.include.signal
84 add_header_library(stdlib_overlay HDRS stdlib_overlay.h)
86 add_proxy_header_library(
87   stdlib_macros
88   HDRS
89     stdlib_macros.h
90   DEPENDS
91     .stdlib_overlay
92   FULL_BUILD_DEPENDS
93     libc.include.stdlib
94     libc.include.llvm-libc-macros.stdlib_macros
97 add_header_library(stdio_overlay HDRS stdio_overlay.h)
99 add_proxy_header_library(
100   stdio_macros
101   HDRS
102     stdio_macros.h
103   DEPENDS
104     .stdio_overlay
105   FULL_BUILD_DEPENDS
106     libc.include.stdio
107     libc.include.llvm-libc-macros.stdio_macros
108     libc.include.llvm-libc-macros.file_seek_macros
111 add_proxy_header_library(
112   sys_epoll_macros
113   HDRS
114     sys_epoll_macros.h
115   FULL_BUILD_DEPENDS
116     libc.include.sys_epoll
117     libc.include.llvm-libc-macros.sys_epoll_macros
120 add_proxy_header_library(
121   sys_stat_macros
122   HDRS
123     sys_stat_macros.h
124   FULL_BUILD_DEPENDS
125     libc.include.sys_stat
126     libc.include.llvm-libc-macros.sys_stat_macros
129 add_proxy_header_library(
130   unistd_macros
131   HDRS
132     unistd_macros.h
133   FULL_BUILD_DEPENDS
134     libc.include.unistd
135     libc.include.llvm-libc-macros.unistd_macros
138 add_proxy_header_library(
139   time_macros
140   HDRS
141     time_macros.h
142   FULL_BUILD_DEPENDS
143     libc.include.time
144     libc.include.llvm-libc-macros.time_macros
147 add_proxy_header_library(
148   float_macros
149   HDRS
150     float_macros.h
151   DEPENDS
152     libc.include.llvm-libc-macros.float_macros
153   FULL_BUILD_DEPENDS
154     libc.include.float
157 add_proxy_header_library(
158   limits_macros
159   HDRS
160     limits_macros.h
161   FULL_BUILD_DEPENDS
162     libc.include.limits
163     libc.include.llvm-libc-macros.limits_macros
166 add_proxy_header_library(
167   link_macros
168   HDRS
169     link_macros.h
170   FULL_BUILD_DEPENDS
171     libc.include.llvm-libc-macros.link_macros
172     libc.include.link
175 add_proxy_header_library(
176   sys_auxv_macros
177   HDRS
178     sys_auxv_macros.h
179   FULL_BUILD_DEPENDS
180     libc.include.llvm-libc-macros.sys_auxv_macros
181     libc.include.sys_auxv
184 add_header_library(wchar_overlay HDRS wchar_overlay.h)
186 add_proxy_header_library(
187   wchar_macros
188   HDRS
189     wchar_macros.h
190   DEPENDS
191     .wchar_overlay
192   FULL_BUILD_DEPENDS
193     libc.include.llvm-libc-macros.wchar_macros
194     libc.include.wchar
197 add_subdirectory(types)
198 add_subdirectory(func)