[InstCombine] Signed saturation patterns
[llvm-complete.git] / utils / gn / secondary / libcxx / include / BUILD.gn
blob92ea241c528139b2519248c104db5930a8d03cb7
1 import("//clang/resource_dir.gni")
2 import("//libcxx/config.gni")
3 import("//llvm/utils/gn/build/write_cmake_config.gni")
5 declare_args() {
6   # Install libc++ support headers.
7   libcxx_install_support_headers = true
10 libcxx_needs_site_config =
11     libcxx_abi_version != 1 || libcxx_abi_namespace != "" || libcxx_abi_unstable
13 if (libcxx_needs_site_config) {
14   write_cmake_config("write_config") {
15     input = "__config_site.in"
16     output = "$target_gen_dir/__config_site"
18     values = []
19     if (libcxx_abi_version != 1) {
20       values += [ "_LIBCPP_ABI_VERSION=$libcxx_abi_version" ]
21     }
22     if (libcxx_abi_namespace != "") {
23       values += [ "_LIBCPP_ABI_NAMESPACE=$libcxx_abi_namespace" ]
24     }
25     if (libcxx_abi_unstable) {
26       values += [ "_LIBCPP_ABI_UNSTABLE=" ]
27     }
28   }
30   # Generate a custom __config header. The new header is created
31   # by prepending __config_site to the current __config header.
32   action("concat_config") {
33     script = "//libcxx/utils/cat_files.py"
34     inputs = [
35       "$target_gen_dir/__config_site",
36       "__config",
37     ]
38     outputs = [
39       "$target_gen_dir/__config",
40     ]
41     args = [
42       "$target_gen_dir/__config_site",
43       "__config",
44       "-o",
45       "$target_gen_dir/__config",
46     ]
47     deps = [
48       ":write_config",
49     ]
50   }
52   copy("copy_config") {
53     sources = [
54       "$target_gen_dir/__config",
55     ]
56     outputs = [
57       "$clang_resource_dir/include/c++/v1/{{source_file_part}}",
58     ]
59     deps = [
60       ":concat_config",
61     ]
62   }
65 copy("include") {
66   sources = [
67     "__bit_reference",
68     "__bsd_locale_defaults.h",
69     "__bsd_locale_fallbacks.h",
70     "__debug",
71     "__errc",
72     "__functional_03",
73     "__functional_base",
74     "__functional_base_03",
75     "__hash_table",
76     "__libcpp_version",
77     "__locale",
78     "__mutex_base",
79     "__node_handle",
80     "__nullptr",
81     "__split_buffer",
82     "__sso_allocator",
83     "__std_stream",
84     "__string",
85     "__threading_support",
86     "__tree",
87     "__tuple",
88     "__undef_macros",
89     "algorithm",
90     "any",
91     "array",
92     "atomic",
93     "bit",
94     "bitset",
95     "cassert",
96     "ccomplex",
97     "cctype",
98     "cerrno",
99     "cfenv",
100     "cfloat",
101     "charconv",
102     "chrono",
103     "cinttypes",
104     "ciso646",
105     "climits",
106     "clocale",
107     "cmath",
108     "codecvt",
109     "compare",
110     "complex",
111     "complex.h",
112     "condition_variable",
113     "csetjmp",
114     "csignal",
115     "cstdarg",
116     "cstdbool",
117     "cstddef",
118     "cstdint",
119     "cstdio",
120     "cstdlib",
121     "cstring",
122     "ctgmath",
123     "ctime",
124     "ctype.h",
125     "cwchar",
126     "cwctype",
127     "deque",
128     "errno.h",
129     "exception",
130     "experimental/__config",
131     "experimental/__memory",
132     "experimental/algorithm",
133     "experimental/coroutine",
134     "experimental/deque",
135     "experimental/filesystem",
136     "experimental/forward_list",
137     "experimental/functional",
138     "experimental/iterator",
139     "experimental/list",
140     "experimental/map",
141     "experimental/memory_resource",
142     "experimental/propagate_const",
143     "experimental/regex",
144     "experimental/set",
145     "experimental/simd",
146     "experimental/string",
147     "experimental/type_traits",
148     "experimental/unordered_map",
149     "experimental/unordered_set",
150     "experimental/utility",
151     "experimental/vector",
152     "ext/__hash",
153     "ext/hash_map",
154     "ext/hash_set",
155     "fenv.h",
156     "filesystem",
157     "float.h",
158     "forward_list",
159     "fstream",
160     "functional",
161     "future",
162     "initializer_list",
163     "inttypes.h",
164     "iomanip",
165     "ios",
166     "iosfwd",
167     "iostream",
168     "istream",
169     "iterator",
170     "limits",
171     "limits.h",
172     "list",
173     "locale",
174     "locale.h",
175     "map",
176     "math.h",
177     "memory",
178     "module.modulemap",
179     "mutex",
180     "new",
181     "numeric",
182     "optional",
183     "ostream",
184     "queue",
185     "random",
186     "ratio",
187     "regex",
188     "scoped_allocator",
189     "set",
190     "setjmp.h",
191     "shared_mutex",
192     "span",
193     "sstream",
194     "stack",
195     "stdbool.h",
196     "stddef.h",
197     "stdexcept",
198     "stdint.h",
199     "stdio.h",
200     "stdlib.h",
201     "streambuf",
202     "string",
203     "string.h",
204     "string_view",
205     "strstream",
206     "system_error",
207     "tgmath.h",
208     "thread",
209     "tuple",
210     "type_traits",
211     "typeindex",
212     "typeinfo",
213     "unordered_map",
214     "unordered_set",
215     "utility",
216     "valarray",
217     "variant",
218     "vector",
219     "version",
220     "wchar.h",
221     "wctype.h",
222   ]
223   deps = [
224     "//libcxxabi/include",
225   ]
226   if (!libcxx_needs_site_config) {
227     sources += [ "__config" ]
228   } else {
229     deps += [ ":copy_config" ]
230   }
231   if (libcxx_install_support_headers) {
232     sources += [
233       "support/android/locale_bionic.h",
234       "support/fuchsia/xlocale.h",
235       "support/ibm/limits.h",
236       "support/ibm/locale_mgmt_aix.h",
237       "support/ibm/support.h",
238       "support/ibm/xlocale.h",
239       "support/musl/xlocale.h",
240       "support/newlib/xlocale.h",
241       "support/solaris/floatingpoint.h",
242       "support/solaris/wchar.h",
243       "support/solaris/xlocale.h",
244       "support/xlocale/__nop_locale_mgmt.h",
245       "support/xlocale/__posix_l_fallback.h",
246       "support/xlocale/__strtonum_fallback.h",
247     ]
248     if (target_os == "win") {
249       sources += [
250         "support/win32/limits_msvc_win32.h",
251         "support/win32/locale_win32.h",
252       ]
253     }
254   }
255   outputs = [
256     "$root_build_dir/include/c++/v1/{{source_target_relative}}",
257   ]