Debian Codegraph @

clang/lib/Headers/CMakeLists.txt

raw
1 # core_files list contains the headers shared by all platforms.
2 # Please consider adding new platform specific headers
3 # to platform specific lists below.
4 set(core_files
5 builtins.h
6 float.h
7 __float_float.h
8 __float_header_macro.h
9 __float_infinity_nan.h
10 inttypes.h
11 iso646.h
12 limits.h
13 module.modulemap
14 stdalign.h
15 stdarg.h
16 __stdarg___gnuc_va_list.h
17 __stdarg___va_copy.h
18 __stdarg_header_macro.h
19 __stdarg_va_arg.h
20 __stdarg_va_copy.h
21 __stdarg_va_list.h
22 stdatomic.h
23 stdbool.h
24 stdcountof.h
25 stdckdint.h
26 stddef.h
27 stddefer.h
28 __stddef_header_macro.h
29 __stddef_max_align_t.h
30 __stddef_null.h
31 __stddef_nullptr_t.h
32 __stddef_offsetof.h
33 __stddef_ptrdiff_t.h
34 __stddef_rsize_t.h
35 __stddef_size_t.h
36 __stddef_unreachable.h
37 __stddef_wchar_t.h
38 __stddef_wint_t.h
39 stdint.h
40 stdnoreturn.h
41 tgmath.h
42 unwind.h
43 varargs.h
44 )
45
46 set(arm_common_files
47 # Headers shared by Arm and AArch64
48 arm_acle.h
49 )
50
51 set(arm_only_files
52 arm_cmse.h
53 armintr.h
54 )
55
56 set(aarch64_only_files
57 arm64intr.h
58 arm_neon_sve_bridge.h
59 )
60
61 set(cuda_files
62 __clang_cuda_builtin_vars.h
63 __clang_cuda_math.h
64 __clang_cuda_cmath.h
65 __clang_cuda_complex_builtins.h
66 __clang_cuda_device_functions.h
67 __clang_cuda_intrinsics.h
68 __clang_cuda_texture_intrinsics.h
69 __clang_cuda_libdevice_declares.h
70 __clang_cuda_math_forward_declares.h
71 __clang_cuda_runtime_wrapper.h
72 )
73
74 set(hexagon_files
75 hexagon_circ_brev_intrinsics.h
76 hexagon_protos.h
77 hexagon_types.h
78 hvx_hexagon_protos.h
79 )
80
81 set(hip_files
82 __clang_hip_libdevice_declares.h
83 __clang_hip_cmath.h
84 __clang_hip_math.h
85 __clang_hip_stdlib.h
86 __clang_hip_runtime_wrapper.h
87 )
88
89 set(hlsl_h
90 hlsl.h
91 )
92 set(hlsl_subdir_files
93 hlsl/hlsl_basic_types.h
94 hlsl/hlsl_alias_intrinsics.h
95 hlsl/hlsl_compat_overloads.h
96 hlsl/hlsl_intrinsic_helpers.h
97 hlsl/hlsl_intrinsics.h
98 hlsl/hlsl_detail.h
99 hlsl/hlsl_spirv.h
100 )
101 set(hlsl_files
102 ${hlsl_h}
103 ${hlsl_subdir_files}
104 )
105
106 set(loongarch_files
107 larchintrin.h
108 lasxintrin.h
109 lsxintrin.h
110 )
111
112 set(mips_msa_files
113 msa.h
114 )
115
116 set(opencl_files
117 opencl-c.h
118 opencl-c-base.h
119 )
120
121 set(ppc_files
122 altivec.h
123 amo.h
124 )
125
126 set(ppc_htm_files
127 htmintrin.h
128 htmxlintrin.h
129 )
130
131 set(riscv_files
132 riscv_bitmanip.h
133 riscv_corev_alu.h
134 riscv_crypto.h
135 riscv_nds.h
136 riscv_ntlh.h
137 sifive_vector.h
138 andes_vector.h
139 riscv_mips.h
140 )
141
142 set(spirv_files
143 __clang_spirv_builtins.h
144 )
145
146 set(systemz_files
147 s390intrin.h
148 vecintrin.h
149 )
150
151 set(ve_files
152 velintrin.h
153 velintrin_gen.h
154 velintrin_approx.h
155 )
156
157 set(webassembly_files
158 wasm_simd128.h
159 )
160
161 set(x86_files
162 # Intrinsics
163 adcintrin.h
164 adxintrin.h
165 ammintrin.h
166 amxavx512intrin.h
167 amxcomplexintrin.h
168 amxfp16intrin.h
169 amxfp8intrin.h
170 amxintrin.h
171 amxmovrsintrin.h
172 amxtf32intrin.h
173 avx10_2_512bf16intrin.h
174 avx10_2_512convertintrin.h
175 avx10_2_512minmaxintrin.h
176 avx10_2_512niintrin.h
177 avx10_2_512satcvtdsintrin.h
178 avx10_2_512satcvtintrin.h
179 avx10_2bf16intrin.h
180 avx10_2convertintrin.h
181 avx10_2copyintrin.h
182 avx10_2minmaxintrin.h
183 avx10_2niintrin.h
184 avx10_2satcvtdsintrin.h
185 avx10_2satcvtintrin.h
186 avx2intrin.h
187 avx512bf16intrin.h
188 avx512bitalgintrin.h
189 avx512bwintrin.h
190 avx512cdintrin.h
191 avx512dqintrin.h
192 avx512fintrin.h
193 avx512fp16intrin.h
194 avx512ifmaintrin.h
195 avx512ifmavlintrin.h
196 avx512vbmi2intrin.h
197 avx512vbmiintrin.h
198 avx512vbmivlintrin.h
199 avx512vlbf16intrin.h
200 avx512vlbitalgintrin.h
201 avx512vlbwintrin.h
202 avx512vlcdintrin.h
203 avx512vldqintrin.h
204 avx512vlfp16intrin.h
205 avx512vlintrin.h
206 avx512vlvbmi2intrin.h
207 avx512vlvnniintrin.h
208 avx512vlvp2intersectintrin.h
209 avx512vnniintrin.h
210 avx512vp2intersectintrin.h
211 avx512vpopcntdqintrin.h
212 avx512vpopcntdqvlintrin.h
213 avxifmaintrin.h
214 avxintrin.h
215 avxneconvertintrin.h
216 avxvnniint16intrin.h
217 avxvnniint8intrin.h
218 avxvnniintrin.h
219 bmi2intrin.h
220 bmiintrin.h
221 cetintrin.h
222 cldemoteintrin.h
223 clflushoptintrin.h
224 clwbintrin.h
225 clzerointrin.h
226 cmpccxaddintrin.h
227 crc32intrin.h
228 emmintrin.h
229 enqcmdintrin.h
230 f16cintrin.h
231 fma4intrin.h
232 fmaintrin.h
233 fxsrintrin.h
234 gfniintrin.h
235 hresetintrin.h
236 ia32intrin.h
237 immintrin.h
238 invpcidintrin.h
239 keylockerintrin.h
240 lwpintrin.h
241 lzcntintrin.h
242 mm3dnow.h
243 mmintrin.h
244 movdirintrin.h
245 movrs_avx10_2_512intrin.h
246 movrs_avx10_2intrin.h
247 movrsintrin.h
248 mwaitxintrin.h
249 nmmintrin.h
250 pconfigintrin.h
251 pkuintrin.h
252 pmmintrin.h
253 popcntintrin.h
254 prfchiintrin.h
255 prfchwintrin.h
256 ptrauth.h
257 ptwriteintrin.h
258 raointintrin.h
259 rdpruintrin.h
260 rdseedintrin.h
261 rtmintrin.h
262 serializeintrin.h
263 sgxintrin.h
264 sha512intrin.h
265 shaintrin.h
266 sm3intrin.h
267 sm4intrin.h
268 sm4evexintrin.h
269 smmintrin.h
270 tbmintrin.h
271 tmmintrin.h
272 tsxldtrkintrin.h
273 uintrintrin.h
274 usermsrintrin.h
275 vaesintrin.h
276 vpclmulqdqintrin.h
277 waitpkgintrin.h
278 wbnoinvdintrin.h
279 __wmmintrin_aes.h
280 wmmintrin.h
281 __wmmintrin_pclmul.h
282 x86gprintrin.h
283 x86intrin.h
284 xmmintrin.h
285 xopintrin.h
286 xsavecintrin.h
287 xsaveintrin.h
288 xsaveoptintrin.h
289 xsavesintrin.h
290 xtestintrin.h
291 # others
292 cet.h
293 cpuid.h
294 )
295
296 set(gpu_files
297 gpuintrin.h
298 nvptxintrin.h
299 amdgpuintrin.h
300 spirvintrin.h
301 )
302
303 set(windows_only_files
304 intrin0.h
305 intrin.h
306 vadefs.h
307 yvals_core.h
308 )
309
310 set(utility_files
311 mm_malloc.h
312 )
313
314 set(files
315 ${core_files}
316 ${arm_common_files}
317 ${arm_only_files}
318 ${aarch64_only_files}
319 ${cuda_files}
320 ${hexagon_files}
321 ${hip_files}
322 ${loongarch_files}
323 ${mips_msa_files}
324 ${opencl_files}
325 ${ppc_files}
326 ${ppc_htm_files}
327 ${riscv_files}
328 ${spirv_files}
329 ${systemz_files}
330 ${ve_files}
331 ${x86_files}
332 ${gpu_files}
333 ${webassembly_files}
334 ${windows_only_files}
335 ${utility_files}
336 )
337
338 set(cuda_wrapper_files
339 cuda_wrappers/algorithm
340 cuda_wrappers/cmath
341 cuda_wrappers/complex
342 cuda_wrappers/new
343 )
344
345 set(cuda_wrapper_bits_files
346 cuda_wrappers/bits/c++config.h
347 cuda_wrappers/bits/shared_ptr_base.h
348 cuda_wrappers/bits/basic_string.h
349 cuda_wrappers/bits/basic_string.tcc
350 )
351
352 set(cuda_wrapper_utility_files
353 cuda_wrappers/__utility/declval.h
354 )
355
356 set(ppc_wrapper_files
357 ppc_wrappers/mmintrin.h
358 ppc_wrappers/xmmintrin.h
359 ppc_wrappers/mm_malloc.h
360 ppc_wrappers/emmintrin.h
361 ppc_wrappers/pmmintrin.h
362 ppc_wrappers/tmmintrin.h
363 ppc_wrappers/smmintrin.h
364 ppc_wrappers/nmmintrin.h
365 ppc_wrappers/bmiintrin.h
366 ppc_wrappers/bmi2intrin.h
367 ppc_wrappers/immintrin.h
368 ppc_wrappers/x86intrin.h
369 ppc_wrappers/x86gprintrin.h
370 )
371
372 set(openmp_wrapper_files
373 openmp_wrappers/math.h
374 openmp_wrappers/cmath
375 # Due to a bug in CMake, `complex` must be before `complex.h`
376 # See: https://gitlab.kitware.com/cmake/cmake/-/issues/26058
377 openmp_wrappers/complex
378 openmp_wrappers/complex.h
379 openmp_wrappers/__clang_openmp_device_functions.h
380 openmp_wrappers/complex_cmath.h
381 openmp_wrappers/new
382 )
383
384 set(llvm_offload_wrapper_files
385 llvm_offload_wrappers/__llvm_offload.h
386 llvm_offload_wrappers/__llvm_offload_host.h
387 llvm_offload_wrappers/__llvm_offload_device.h
388 )
389
390 set(llvm_libc_wrapper_files
391 llvm_libc_wrappers/assert.h
392 llvm_libc_wrappers/stdio.h
393 llvm_libc_wrappers/stdlib.h
394 llvm_libc_wrappers/string.h
395 llvm_libc_wrappers/ctype.h
396 llvm_libc_wrappers/inttypes.h
397 llvm_libc_wrappers/time.h
398 )
399
400 set(zos_wrapper_files
401 zos_wrappers/builtins.h
402 )
403
404 include(GetClangResourceDir)
405 get_clang_resource_dir(output_dir PREFIX ${LLVM_LIBRARY_OUTPUT_INTDIR}/.. SUBDIR include)
406 set(out_files)
407 set(generated_files)
408
409 set(arm_common_generated_files)
410 set(arm_only_generated_files)
411 set(aarch64_only_generated_files)
412 set(riscv_generated_files)
413
414 function(copy_header_to_output_dir src_dir file)
415 set(src ${src_dir}/${file})
416 if("${CMAKE_CFG_INTDIR}" STREQUAL ".")
417 set(dst ${output_dir}/${file})
418 add_custom_command(OUTPUT ${dst}
419 DEPENDS ${src}
420 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
421 COMMENT "Copying clang's ${file}...")
422 list(APPEND out_files ${dst})
423 else()
424 foreach(BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
425 # Replace the special string with a per config directory.
426 string(REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} per_conf_output_dir ${output_dir})
427 set(dst ${per_conf_output_dir}/${file})
428 add_custom_command(OUTPUT ${dst}
429 DEPENDS ${src}
430 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
431 COMMENT "Copying clang's ${file}...")
432 list(APPEND out_files ${dst})
433 endforeach()
434 endif()
435 set(out_files ${out_files} PARENT_SCOPE)
436 endfunction(copy_header_to_output_dir)
437
438 function(clang_generate_header td_option td_file out_file)
439 clang_tablegen(${out_file} ${td_option}
440 -I ${CLANG_SOURCE_DIR}/include/clang/Basic/
441 SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/${td_file})
442
443 copy_header_to_output_dir(${CMAKE_CURRENT_BINARY_DIR} ${out_file})
444 set(out_files ${out_files} PARENT_SCOPE)
445 list(APPEND generated_files "${CMAKE_CURRENT_BINARY_DIR}/${out_file}")
446 set(generated_files ${generated_files} PARENT_SCOPE)
447 endfunction(clang_generate_header)
448
449
450 # Copy header files from the source directory to the build directory
451 foreach( f ${files} ${cuda_wrapper_files} ${cuda_wrapper_bits_files}
452 ${cuda_wrapper_utility_files} ${ppc_wrapper_files} ${openmp_wrapper_files}
453 ${zos_wrapper_files} ${hlsl_files} ${llvm_libc_wrapper_files}
454 ${llvm_offload_wrapper_files})
455 copy_header_to_output_dir(${CMAKE_CURRENT_SOURCE_DIR} ${f})
456 endforeach( f )
457
458 # Generate header files and copy them to the build directory
459 if(ARM IN_LIST LLVM_TARGETS_TO_BUILD OR AArch64 IN_LIST LLVM_TARGETS_TO_BUILD)
460 # Generate arm_neon.h
461 clang_generate_header(-gen-arm-neon arm_neon.td arm_neon.h)
462 # Generate arm_fp16.h
463 clang_generate_header(-gen-arm-fp16 arm_fp16.td arm_fp16.h)
464 # Generate arm_sve.h
465 clang_generate_header(-gen-arm-sve-header arm_sve.td arm_sve.h)
466 # Generate arm_sme.h
467 clang_generate_header(-gen-arm-sme-header arm_sme.td arm_sme.h)
468 # Generate arm_bf16.h
469 clang_generate_header(-gen-arm-bf16 arm_bf16.td arm_bf16.h)
470 # Generate arm_mve.h
471 clang_generate_header(-gen-arm-mve-header arm_mve.td arm_mve.h)
472 # Generate arm_cde.h
473 clang_generate_header(-gen-arm-cde-header arm_cde.td arm_cde.h)
474 # Generate arm_vector_types.h
475 clang_generate_header(-gen-arm-vector-type arm_neon.td arm_vector_types.h)
476
477 # Add headers to target specific lists
478 list(APPEND arm_common_generated_files
479 "${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h"
480 "${CMAKE_CURRENT_BINARY_DIR}/arm_fp16.h"
481 )
482
483 list(APPEND arm_only_generated_files
484 "${CMAKE_CURRENT_BINARY_DIR}/arm_mve.h"
485 "${CMAKE_CURRENT_BINARY_DIR}/arm_cde.h"
486 )
487
488 list(APPEND aarch64_only_generated_files
489 "${CMAKE_CURRENT_BINARY_DIR}/arm_sve.h"
490 "${CMAKE_CURRENT_BINARY_DIR}/arm_sme.h"
491 "${CMAKE_CURRENT_BINARY_DIR}/arm_bf16.h"
492 "${CMAKE_CURRENT_BINARY_DIR}/arm_vector_types.h"
493 )
494 endif()
495 if(RISCV IN_LIST LLVM_TARGETS_TO_BUILD)
496 # Generate riscv_vector.h
497 clang_generate_header(-gen-riscv-vector-header riscv_vector.td riscv_vector.h)
498 list(APPEND riscv_generated_files
499 "${CMAKE_CURRENT_BINARY_DIR}/riscv_vector.h"
500 )
501 endif()
502
503
504 # Check if the generated headers are included in a target specific lists
505 # Currently, all generated headers are target specific.
506 set(all_target_specific_generated_files
507 ${arm_common_generated_files}
508 ${arm_only_generated_files}
509 ${aarch64_only_generated_files}
510 ${riscv_generated_files})
511 foreach( f ${generated_files} )
512 if (NOT ${f} IN_LIST all_target_specific_generated_files)
513 message(WARNING "${f} is a generated header but it is not included in any "
514 "target specific header lists! The resource-headers "
515 "distribtion target will be incorrect!")
516 endif()
517 endforeach( f )
518
519 function(add_header_target target_name file_list)
520 add_library(${target_name} INTERFACE ${file_list})
521 set_target_properties(${target_name} PROPERTIES
522 FOLDER "Clang/Resources"
523 RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
524 endfunction()
525
526 # The catch-all clang-resource-headers target
527 add_library(clang-resource-headers INTERFACE ${out_files})
528 set_target_properties("clang-resource-headers" PROPERTIES
529 FOLDER "Clang/Resources"
530 RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
531 add_dependencies("clang-resource-headers"
532 "core-resource-headers"
533 "arm-common-resource-headers"
534 "arm-resource-headers"
535 "aarch64-resource-headers"
536 "cuda-resource-headers"
537 "hexagon-resource-headers"
538 "hip-resource-headers"
539 "hlsl-resource-headers"
540 "loongarch-resource-headers"
541 "mips-resource-headers"
542 "ppc-resource-headers"
543 "ppc-htm-resource-headers"
544 "riscv-resource-headers"
545 "spirv-resource-headers"
546 "systemz-resource-headers"
547 "ve-resource-headers"
548 "webassembly-resource-headers"
549 "x86-resource-headers"
550 "opencl-resource-headers"
551 "openmp-resource-headers"
552 "llvm-libc-resource-headers"
553 "windows-resource-headers"
554 "utility-resource-headers")
555
556 # Core/common headers
557 add_header_target("core-resource-headers" ${core_files})
558 add_header_target("arm-common-resource-headers" "${arm_common_files};${arm_common_generated_files}")
559
560 # Architecture/platform specific targets
561 add_header_target("arm-resource-headers" "${arm_only_files};${arm_only_generated_files}")
562 add_header_target("aarch64-resource-headers" "${aarch64_only_files};${aarch64_only_generated_files}")
563 add_header_target("cuda-resource-headers" "${cuda_files};${cuda_wrapper_files};${cuda_wrapper_bits_files};${cuda_wrapper_utility_files}")
564 add_header_target("hexagon-resource-headers" "${hexagon_files}")
565 add_header_target("hip-resource-headers" "${hip_files}")
566 add_header_target("loongarch-resource-headers" "${loongarch_files}")
567 add_header_target("mips-resource-headers" "${mips_msa_files}")
568 add_header_target("ppc-resource-headers" "${ppc_files};${ppc_wrapper_files}")
569 add_header_target("ppc-htm-resource-headers" "${ppc_htm_files}")
570 add_header_target("riscv-resource-headers" "${riscv_files};${riscv_generated_files}")
571 add_header_target("systemz-resource-headers" "${systemz_files};${zos_wrapper_files}")
572 add_header_target("ve-resource-headers" "${ve_files}")
573 add_header_target("webassembly-resource-headers" "${webassembly_files}")
574 add_header_target("x86-resource-headers" "${x86_files}")
575 add_header_target("gpu-resource-headers" "${gpu_files}")
576
577 # Other header groupings
578 add_header_target("hlsl-resource-headers" ${hlsl_files})
579 add_header_target("spirv-resource-headers" ${spirv_files})
580 add_header_target("opencl-resource-headers" ${opencl_files})
581 add_header_target("llvm-libc-resource-headers" ${llvm_libc_wrapper_files})
582 add_header_target("openmp-resource-headers" ${openmp_wrapper_files})
583 add_header_target("llvm-offload-resource-headers" ${llvm_libc_wrapper_files})
584 add_header_target("windows-resource-headers" ${windows_only_files})
585 add_header_target("utility-resource-headers" ${utility_files})
586
587 get_clang_resource_dir(header_install_dir SUBDIR include)
588 target_include_directories(clang-resource-headers INTERFACE
589 $<BUILD_INTERFACE:${output_dir}>
590 $<INSTALL_INTERFACE:${header_install_dir}>)
591 set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS clang-resource-headers)
592
593 #############################################################
594 # Install rules for the catch-all clang-resource-headers target
595 install(
596 FILES ${files} ${generated_files}
597 DESTINATION ${header_install_dir}
598 COMPONENT clang-resource-headers)
599
600 install(
601 FILES ${cuda_wrapper_files}
602 DESTINATION ${header_install_dir}/cuda_wrappers
603 COMPONENT clang-resource-headers)
604
605 install(
606 FILES ${cuda_wrapper_bits_files}
607 DESTINATION ${header_install_dir}/cuda_wrappers/bits
608 COMPONENT clang-resource-headers)
609
610 install(
611 FILES ${cuda_wrapper_utility_files}
612 DESTINATION ${header_install_dir}/cuda_wrappers/__utility
613 COMPONENT clang-resource-headers)
614
615 install(
616 FILES ${ppc_wrapper_files}
617 DESTINATION ${header_install_dir}/ppc_wrappers
618 COMPONENT clang-resource-headers)
619
620 install(
621 FILES ${llvm_libc_wrapper_files}
622 DESTINATION ${header_install_dir}/llvm_libc_wrappers
623 COMPONENT clang-resource-headers)
624
625 install(
626 FILES ${openmp_wrapper_files}
627 DESTINATION ${header_install_dir}/openmp_wrappers
628 COMPONENT clang-resource-headers)
629
630 install(
631 FILES ${llvm_offload_wrapper_files}
632 DESTINATION ${header_install_dir}/llvm_offload_wrappers
633 COMPONENT clang-resource-headers)
634
635 install(
636 FILES ${zos_wrapper_files}
637 DESTINATION ${header_install_dir}/zos_wrappers
638 COMPONENT clang-resource-headers)
639
640 #############################################################
641 # Install rules for separate header lists
642 install(
643 FILES ${core_files}
644 DESTINATION ${header_install_dir}
645 EXCLUDE_FROM_ALL
646 COMPONENT core-resource-headers)
647
648 install(
649 FILES ${arm_common_files} ${arm_common_generated_files}
650 DESTINATION ${header_install_dir}
651 EXCLUDE_FROM_ALL
652 COMPONENT arm-common-resource-headers)
653
654 install(
655 FILES ${arm_only_files} ${arm_only_generated_files}
656 DESTINATION ${header_install_dir}
657 EXCLUDE_FROM_ALL
658 COMPONENT arm-resource-headers)
659
660 install(
661 FILES ${aarch64_only_files} ${aarch64_only_generated_files}
662 DESTINATION ${header_install_dir}
663 EXCLUDE_FROM_ALL
664 COMPONENT aarch64-resource-headers)
665
666 install(
667 FILES ${cuda_wrapper_files}
668 DESTINATION ${header_install_dir}/cuda_wrappers
669 EXCLUDE_FROM_ALL
670 COMPONENT cuda-resource-headers)
671
672 install(
673 FILES ${cuda_wrapper_bits_files}
674 DESTINATION ${header_install_dir}/cuda_wrappers/bits
675 EXCLUDE_FROM_ALL
676 COMPONENT cuda-resource-headers)
677
678 install(
679 FILES ${cuda_wrapper_utility_files}
680 DESTINATION ${header_install_dir}/cuda_wrappers/__utility
681 EXCLUDE_FROM_ALL
682 COMPONENT cuda-resource-headers)
683
684 install(
685 FILES ${cuda_files}
686 DESTINATION ${header_install_dir}
687 EXCLUDE_FROM_ALL
688 COMPONENT cuda-resource-headers)
689
690 install(
691 FILES ${hexagon_files}
692 DESTINATION ${header_install_dir}
693 EXCLUDE_FROM_ALL
694 COMPONENT hexagon-resource-headers)
695
696 install(
697 FILES ${hip_files}
698 DESTINATION ${header_install_dir}
699 EXCLUDE_FROM_ALL
700 COMPONENT hip-resource-headers)
701
702 install(
703 FILES ${loongarch_files}
704 DESTINATION ${header_install_dir}
705 EXCLUDE_FROM_ALL
706 COMPONENT loongarch-resource-headers)
707
708 install(
709 FILES ${mips_msa_files}
710 DESTINATION ${header_install_dir}
711 EXCLUDE_FROM_ALL
712 COMPONENT mips-resource-headers)
713
714 install(
715 FILES ${ppc_wrapper_files}
716 DESTINATION ${header_install_dir}/ppc_wrappers
717 EXCLUDE_FROM_ALL
718 COMPONENT ppc-resource-headers)
719
720 install(
721 FILES ${ppc_files}
722 DESTINATION ${header_install_dir}
723 EXCLUDE_FROM_ALL
724 COMPONENT ppc-resource-headers)
725
726 install(
727 FILES ${ppc_htm_files}
728 DESTINATION ${header_install_dir}
729 EXCLUDE_FROM_ALL
730 COMPONENT ppc-htm-resource-headers)
731
732 install(
733 FILES ${riscv_generated_files}
734 DESTINATION ${header_install_dir}
735 EXCLUDE_FROM_ALL
736 COMPONENT riscv-resource-headers)
737
738 install(
739 FILES ${riscv_files}
740 DESTINATION ${header_install_dir}
741 EXCLUDE_FROM_ALL
742 COMPONENT riscv-resource-headers)
743
744 install(
745 FILES ${systemz_files}
746 DESTINATION ${header_install_dir}
747 EXCLUDE_FROM_ALL
748 COMPONENT systemz-resource-headers)
749
750 install(
751 FILES ${zos_wrapper_files}
752 DESTINATION ${header_install_dir}/zos_wrappers
753 EXCLUDE_FROM_ALL
754 COMPONENT systemz-resource-headers)
755
756 install(
757 FILES ${ve_files}
758 DESTINATION ${header_install_dir}
759 EXCLUDE_FROM_ALL
760 COMPONENT ve-resource-headers)
761
762 install(
763 FILES ${webassembly_files}
764 DESTINATION ${header_install_dir}
765 EXCLUDE_FROM_ALL
766 COMPONENT webassembly-resource-headers)
767
768 install(
769 FILES ${x86_files}
770 DESTINATION ${header_install_dir}
771 EXCLUDE_FROM_ALL
772 COMPONENT x86-resource-headers)
773
774 install(
775 FILES ${gpu_files}
776 DESTINATION ${header_install_dir}
777 EXCLUDE_FROM_ALL
778 COMPONENT gpu-resource-headers)
779
780 if(NOT CLANG_ENABLE_HLSL)
781 set(EXCLUDE_HLSL EXCLUDE_FROM_ALL)
782 endif()
783
784 install(
785 FILES ${hlsl_h}
786 DESTINATION ${header_install_dir}
787 ${EXCLUDE_HLSL}
788 COMPONENT hlsl-resource-headers)
789
790 install(
791 FILES ${hlsl_subdir_files}
792 DESTINATION ${header_install_dir}/hlsl
793 ${EXCLUDE_HLSL}
794 COMPONENT hlsl-resource-headers)
795
796 install(
797 FILES ${spirv_files}
798 DESTINATION ${header_install_dir}
799 EXCLUDE_FROM_ALL
800 COMPONENT spirv-resource-headers)
801
802 install(
803 FILES ${opencl_files}
804 DESTINATION ${header_install_dir}
805 EXCLUDE_FROM_ALL
806 COMPONENT opencl-resource-headers)
807
808 install(
809 FILES ${openmp_wrapper_files}
810 DESTINATION ${header_install_dir}/openmp_wrappers
811 EXCLUDE_FROM_ALL
812 COMPONENT openmp-resource-headers)
813
814 install(
815 FILES ${llvm_offload_wrapper_files}
816 DESTINATION ${header_install_dir}/llvm_offload_wrappers
817 EXCLUDE_FROM_ALL
818 COMPONENT openmp-resource-headers)
819
820 install(
821 FILES ${utility_files}
822 DESTINATION ${header_install_dir}
823 EXCLUDE_FROM_ALL
824 COMPONENT utility-resource-headers)
825
826 install(
827 FILES ${windows_only_files}
828 DESTINATION ${header_install_dir}
829 EXCLUDE_FROM_ALL
830 COMPONENT windows-resource-headers)
831 #############################################################
832
833 if (NOT LLVM_ENABLE_IDE)
834 add_llvm_install_targets(install-clang-resource-headers
835 DEPENDS clang-resource-headers
836 COMPONENT clang-resource-headers)
837
838 add_llvm_install_targets(install-core-resource-headers
839 DEPENDS core-resource-headers
840 COMPONENT core-resource-headers)
841 add_llvm_install_targets(install-arm-common-resource-headers
842 DEPENDS arm-common-resource-headers
843 COMPONENT arm-common-resource-headers)
844 add_llvm_install_targets(install-arm-resource-headers
845 DEPENDS arm-resource-headers
846 COMPONENT arm-resource-headers)
847 add_llvm_install_targets(install-aarch64-resource-headers
848 DEPENDS aarch64-resource-headers
849 COMPONENT aarch64-resource-headers)
850 add_llvm_install_targets(install-cuda-resource-headers
851 DEPENDS cuda-resource-headers
852 COMPONENT cuda-resource-headers)
853 add_llvm_install_targets(install-hexagon-resource-headers
854 DEPENDS hexagon-resource-headers
855 COMPONENT hexagon-resource-headers)
856 add_llvm_install_targets(install-hip-resource-headers
857 DEPENDS hip-resource-headers
858 COMPONENT hip-resource-headers)
859 add_llvm_install_targets(install-mips-resource-headers
860 DEPENDS mips-resource-headers
861 COMPONENT mips-resource-headers)
862 add_llvm_install_targets(install-ppc-resource-headers
863 DEPENDS ppc-resource-headers
864 COMPONENT ppc-resource-headers)
865 add_llvm_install_targets(install-ppc-htm-resource-headers
866 DEPENDS ppc-htm-resource-headers
867 COMPONENT ppc-htm-resource-headers)
868 add_llvm_install_targets(install-riscv-resource-headers
869 DEPENDS riscv-resource-headers
870 COMPONENT riscv-resource-headers)
871 add_llvm_install_targets(install-spirv-resource-headers
872 DEPENDS spirv-resource-headers
873 COMPONENT spirv-resource-headers)
874 add_llvm_install_targets(install-systemz-resource-headers
875 DEPENDS systemz-resource-headers
876 COMPONENT systemz-resource-headers)
877 add_llvm_install_targets(install-ve-resource-headers
878 DEPENDS ve-resource-headers
879 COMPONENT ve-resource-headers)
880 add_llvm_install_targets(install-x86-resource-headers
881 DEPENDS x86-resource-headers
882 COMPONENT x86-resource-headers)
883 add_llvm_install_targets(install-webassembly-resource-headers
884 DEPENDS webassembly-resource-headers
885 COMPONENT webassembly-resource-headers)
886
887 add_llvm_install_targets(install-hlsl-resource-headers
888 DEPENDS hlsl-resource-headers
889 COMPONENT hlsl-resource-headers)
890 add_llvm_install_targets(install-opencl-resource-headers
891 DEPENDS opencl-resource-headers
892 COMPONENT opencl-resource-headers)
893 add_llvm_install_targets(install-openmp-resource-headers
894 DEPENDS openmp-resource-headers
895 COMPONENT openmp-resource-headers)
896 add_llvm_install_targets(install-windows-resource-headers
897 DEPENDS windows-resource-headers
898 COMPONENT windows-resource-headers)
899 add_llvm_install_targets(install-utility-resource-headers
900 DEPENDS utility-resource-headers
901 COMPONENT utility-resource-headers)
902 endif()
903
904 source_group("Clang Runtime Headers" FILES ${files})