872 lines · plain
1set(LIBC_INCLUDE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})2set(LIBC_INCLUDE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})3 4include(LLVMLibCHeaderRules)5 6# The GPU build wants to install files in the compiler's resource directory.7if(LIBC_TARGET_OS_IS_GPU)8 include(GetClangResourceDir)9endif()10 11add_subdirectory(llvm-libc-macros)12add_subdirectory(llvm-libc-types)13 14add_header(15 llvm_libc_common_h16 HDR17 __llvm-libc-common.h18)19 20# TODO: Can we simplify this macro expansion?21# https://github.com/llvm/llvm-project/issues/11725422macro(add_header_macro TARGET_NAME YAML_FILE GEN_HDR DEPENDS)23 add_gen_header(24 ${TARGET_NAME}25 YAML_FILE ${YAML_FILE}26 GEN_HDR ${GEN_HDR}27 ${DEPENDS}28 ${ARGN}29 )30endmacro()31 32add_header_macro(33 ctype34 ../libc/include/ctype.yaml35 ctype.h36 DEPENDS37 .llvm_libc_common_h38 .llvm-libc-types.locale_t39)40 41add_header_macro(42 dirent43 ../libc/include/dirent.yaml44 dirent.h45 DEPENDS46 .llvm_libc_common_h47 .llvm-libc-types.ino_t48 .llvm-libc-types.DIR49 .llvm-libc-types.struct_dirent50)51 52add_header_macro(53 fcntl54 ../libc/include/fcntl.yaml55 fcntl.h56 DEPENDS57 .llvm-libc-macros.fcntl_macros58 .llvm-libc-types.mode_t59 .llvm-libc-types.struct_flock60 .llvm-libc-types.struct_flock6461 .llvm-libc-types.off64_t62 .llvm-libc-types.pid_t63 .llvm-libc-types.off_t64 .llvm_libc_common_h65)66 67add_header_macro(68 dlfcn69 ../libc/include/dlfcn.yaml70 dlfcn.h71 DEPENDS72 .llvm_libc_common_h73 .llvm-libc-types.dl_info74)75 76add_header_macro(77 endian78 ../libc/include/endian.yaml79 endian.h80 DEPENDS81 .llvm-libc-macros.endian_macros82 .llvm_libc_common_h83)84 85add_header_macro(86 features87 ../libc/include/features.yaml88 features.h89 DEPENDS90 .llvm_libc_common_h91 .llvm-libc-macros.features_macros92)93 94add_header_macro(95 fenv96 ../libc/include/fenv.yaml97 fenv.h98 DEPENDS99 .llvm_libc_common_h100 .llvm-libc-macros.fenv_macros101 .llvm-libc-types.fenv_t102 .llvm-libc-types.fexcept_t103)104 105add_header_macro(106 stdint107 ../libc/include/stdint.yaml108 stdint.h109 DEPENDS110 .llvm-libc-macros.stdint_macros111)112 113add_header_macro(114 inttypes115 ../libc/include/inttypes.yaml116 inttypes.h117 DEPENDS118 .llvm_libc_common_h119 .llvm-libc-types.imaxdiv_t120 .llvm-libc-macros.inttypes_macros121 .stdint122)123 124add_header_macro(125 float126 ../libc/include/float.yaml127 float.h128 DEPENDS129 .llvm-libc-macros.float_macros130)131 132add_header_macro(133 limits134 ../libc/include/limits.yaml135 limits.h136 DEPENDS137 .llvm-libc-macros.limits_macros138)139 140add_header_macro(141 malloc142 ../libc/include/malloc.yaml143 malloc.h144 DEPENDS145 .llvm_libc_common_h146 .llvm-libc-macros.malloc_macros147)148 149add_header_macro(150 math151 ../libc/include/math.yaml152 math.h153 DEPENDS154 .llvm_libc_common_h155 .llvm-libc-macros.float16_macros156 .llvm-libc-macros.math_macros157 .llvm-libc-macros.math_function_macros158 .llvm-libc-types.double_t159 .llvm-libc-types.float_t160 .llvm-libc-types.float128161)162 163add_header_macro(164 stdfix165 ../libc/include/stdfix.yaml166 stdfix.h167 DEPENDS168 .llvm-libc-macros.stdfix_macros169 .llvm-libc-types.int_hk_t170 .llvm-libc-types.int_hr_t171 .llvm-libc-types.int_k_t172 .llvm-libc-types.int_lk_t173 .llvm-libc-types.int_lr_t174 .llvm-libc-types.int_r_t175 .llvm-libc-types.uint_uhk_t176 .llvm-libc-types.uint_uhr_t177 .llvm-libc-types.uint_uk_t178 .llvm-libc-types.uint_ulk_t179 .llvm-libc-types.uint_ulr_t180 .llvm-libc-types.uint_ur_t181)182 183 184add_header_macro(185 sysexits186 ../libc/include/sysexits.yaml187 sysexits.h188 DEPENDS189 .llvm-libc-macros.sysexits_macros190)191 192 193# TODO: This should be conditional on POSIX networking being included.194file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/arpa)195 196add_header_macro(197 arpa_inet198 ../libc/include/arpa/inet.yaml199 arpa/inet.h200 DEPENDS201 .llvm_libc_common_h202 .inttypes203 .llvm-libc-types.in_addr204 .llvm-libc-types.in_addr_t205)206 207file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/netinet)208 209add_header_macro(210 netinet_in211 ../libc/include/netinet/in.yaml212 netinet/in.h213 DEPENDS214 .llvm_libc_common_h215 .llvm-libc-macros.netinet_in_macros216)217 218add_header_macro(219 assert220 ../libc/include/assert.yaml221 assert.h222 DEPENDS223 .llvm_libc_common_h224 .llvm-libc-macros.assert_macros225)226 227add_header_macro(228 complex229 ../libc/include/complex.yaml230 complex.h231 DEPENDS232 .llvm_libc_common_h233 .llvm-libc-macros.complex_macros234 .llvm-libc-types.float128235 .llvm-libc-types.cfloat128236 .llvm-libc-types.cfloat16237)238 239add_header_macro(240 setjmp241 ../libc/include/setjmp.yaml242 setjmp.h243 DEPENDS244 .llvm_libc_common_h245 .llvm-libc-types.jmp_buf246 .llvm-libc-types.sigjmp_buf247)248 249add_header_macro(250 string251 ../libc/include/string.yaml252 string.h253 DEPENDS254 .llvm_libc_common_h255 .llvm-libc-macros.null_macro256 .llvm-libc-types.size_t257)258 259add_header_macro(260 strings261 ../libc/include/strings.yaml262 strings.h263 DEPENDS264 .llvm_libc_common_h265 .llvm-libc-types.size_t266)267 268add_header_macro(269 search270 ../libc/include/search.yaml271 search.h272 DEPENDS273 .llvm-libc-types.ACTION274 .llvm-libc-types.ENTRY275 .llvm-libc-types.VISIT276 .llvm-libc-types.__search_compare_t277 .llvm-libc-types.size_t278 .llvm-libc-types.struct_hsearch_data279 .llvm_libc_common_h280)281 282add_header_macro(283 time284 ../libc/include/time.yaml285 time.h286 DEPENDS287 .llvm_libc_common_h288 .llvm-libc-macros.null_macro289 .llvm-libc-macros.time_macros290 .llvm-libc-types.clock_t291 .llvm-libc-types.time_t292 .llvm-libc-types.struct_tm293 .llvm-libc-types.struct_timespec294 .llvm-libc-types.struct_timeval295 .llvm-libc-types.clockid_t296)297 298add_header_macro(299 threads300 ../libc/include/threads.yaml301 threads.h302 DEPENDS303 .llvm_libc_common_h304 .llvm-libc-types.__call_once_func_t305 .llvm-libc-types.once_flag306 .llvm-libc-types.cnd_t307 .llvm-libc-types.mtx_t308 .llvm-libc-types.thrd_t309 .llvm-libc-types.thrd_start_t310 .llvm-libc-types.tss_t311 .llvm-libc-types.tss_dtor_t312)313 314add_header_macro(315 errno316 ../libc/include/errno.yaml317 errno.h318 DEPENDS319 .llvm-libc-macros.generic_error_number_macros320 .llvm-libc-macros.error_number_macros321)322 323add_header_macro(324 signal325 ../libc/include/signal.yaml326 signal.h327 DEPENDS328 .llvm-libc-macros.signal_macros329 .llvm-libc-types.pid_t330 .llvm-libc-types.sig_atomic_t331 .llvm-libc-types.sighandler_t332 .llvm-libc-types.siginfo_t333 .llvm-libc-types.sigset_t334 .llvm-libc-types.stack_t335 .llvm-libc-types.struct_sigaction336 .llvm-libc-types.union_sigval337)338 339add_header_macro(340 stdbit341 ../libc/include/stdbit.yaml342 stdbit.h343 DEPENDS344 .llvm_libc_common_h345 .llvm-libc-macros.stdbit_macros346)347 348add_header_macro(349 stdckdint350 ../libc/include/stdckdint.yaml351 stdckdint.h352 DEPENDS353 .llvm_libc_common_h354 .llvm-libc-macros.stdckdint_macros355)356 357add_header_macro(358 stdio359 ../libc/include/stdio.yaml360 stdio.h361 DEPENDS362 .llvm-libc-macros.file_seek_macros363 .llvm-libc-macros.null_macro364 .llvm-libc-macros.stdio_macros365 .llvm-libc-types.FILE366 .llvm-libc-types.cookie_io_functions_t367 .llvm-libc-types.off_t368 .llvm-libc-types.size_t369 .llvm-libc-types.ssize_t370 .llvm_libc_common_h371)372 373add_header_macro(374 stdlib375 ../libc/include/stdlib.yaml376 stdlib.h377 DEPENDS378 .llvm-libc-macros.null_macro379 .llvm-libc-macros.stdlib_macros380 .llvm-libc-types.__atexithandler_t381 .llvm-libc-types.__qsortcompare_t382 .llvm-libc-types.__qsortrcompare_t383 .llvm-libc-types.__search_compare_t384 .llvm-libc-types.div_t385 .llvm-libc-types.ldiv_t386 .llvm-libc-types.lldiv_t387 .llvm-libc-types.locale_t388 .llvm-libc-types.size_t389 .llvm_libc_common_h390)391 392add_header_macro(393 unistd394 ../libc/include/unistd.yaml395 unistd.h396 DEPENDS397 .llvm_libc_common_h398 .llvm-libc-macros.file_seek_macros399 .llvm-libc-macros.unistd_macros400 .llvm-libc-types.__exec_argv_t401 .llvm-libc-types.__exec_envp_t402 .llvm-libc-types.off_t403 .llvm-libc-types.pid_t404 .llvm-libc-types.size_t405 .llvm-libc-types.ssize_t406 .llvm-libc-types.uid_t407 .llvm-libc-types.__getoptargv_t408)409 410add_header_macro(411 pthread412 ../libc/include/pthread.yaml413 pthread.h414 DEPENDS415 .llvm-libc-macros.pthread_macros416 .llvm-libc-types.__atfork_callback_t417 .llvm-libc-types.__pthread_once_func_t418 .llvm-libc-types.__pthread_start_t419 .llvm-libc-types.__pthread_tss_dtor_t420 .llvm-libc-types.pthread_attr_t421 .llvm-libc-types.pthread_condattr_t422 .llvm-libc-types.pthread_key_t423 .llvm-libc-types.pthread_barrier_t424 .llvm-libc-types.pthread_barrierattr_t425 .llvm-libc-types.pthread_mutex_t426 .llvm-libc-types.pthread_mutexattr_t427 .llvm-libc-types.pthread_once_t428 .llvm-libc-types.pthread_rwlock_t429 .llvm-libc-types.pthread_rwlockattr_t430 .llvm-libc-types.pthread_spinlock_t431 .llvm-libc-types.pthread_t432 .llvm_libc_common_h433)434 435add_header_macro(436 sched437 ../libc/include/sched.yaml438 sched.h439 DEPENDS440 .llvm_libc_common_h441 .llvm-libc-macros.sched_macros442 .llvm-libc-types.cpu_set_t443 .llvm-libc-types.pid_t444 .llvm-libc-types.size_t445 .llvm-libc-types.struct_sched_param446 # Needed according to posix standard447 .llvm-libc-types.time_t448 .llvm-libc-types.struct_timespec449)450 451add_header_macro(452 spawn453 ../libc/include/spawn.yaml454 spawn.h455 DEPENDS456 .llvm_libc_common_h457 .llvm-libc-types.mode_t458 .llvm-libc-types.pid_t459 .llvm-libc-types.posix_spawnattr_t460 .llvm-libc-types.posix_spawn_file_actions_t461)462 463add_header_macro(464 link465 ../libc/include/link.yaml466 link.h467 DEPENDS468 .llvm_libc_common_h469 .llvm-libc-macros.link_macros470 .llvm-libc-types.struct_dl_phdr_info471 .llvm-libc-types.__dl_iterate_phdr_callback_t472)473 474add_header_macro(475 elf476 ../libc/include/elf.yaml477 elf.h478 DEPENDS479 .llvm-libc-macros.elf_macros480)481 482# TODO: Not all platforms will have a include/sys directory. Add the sys483# directory and the targets for sys/*.h files conditional to the OS requiring484# them.485file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/sys)486 487add_header_macro(488 sys_auxv489 ../libc/include/sys/auxv.yaml490 sys/auxv.h491 DEPENDS492 .llvm_libc_common_h493 .llvm-libc-macros.sys_auxv_macros494)495 496add_header_macro(497 sys_epoll498 ../libc/include/sys/epoll.yaml499 sys/epoll.h500 DEPENDS501 .llvm_libc_common_h502 .llvm-libc-types.struct_epoll_event503 .llvm-libc-types.struct_epoll_data504 .llvm-libc-types.sigset_t505 .llvm-libc-macros.sys_epoll_macros506)507 508add_header_macro(509 sys_ioctl510 ../libc/include/sys/ioctl.yaml511 sys/ioctl.h512 DEPENDS513 .llvm_libc_common_h514 .llvm-libc-macros.sys_ioctl_macros515)516 517add_header_macro(518 sys_mman519 ../libc/include/sys/mman.yaml520 sys/mman.h521 DEPENDS522 .llvm_libc_common_h523 .llvm-libc-macros.sys_mman_macros524 .llvm-libc-types.off_t525 .llvm-libc-types.size_t526 .llvm-libc-types.ssize_t527)528 529add_header_macro(530 sys_prctl531 ../libc/include/sys/prctl.yaml532 sys/prctl.h533 DEPENDS534 .llvm_libc_common_h535)536 537add_header(538 sys_queue539 HDR540 sys/queue.h541 DEPENDS542 .llvm-libc-macros.sys_queue_macros543)544 545add_header_macro(546 sys_random547 ../libc/include/sys/random.yaml548 sys/random.h549 DEPENDS550 .llvm_libc_common_h551 .llvm-libc-macros.sys_random_macros552 .llvm-libc-types.size_t553 .llvm-libc-types.ssize_t554)555 556add_header_macro(557 sys_resource558 ../libc/include/sys/resource.yaml559 sys/resource.h560 DEPENDS561 .llvm_libc_common_h562 .llvm-libc-macros.sys_resource_macros563 .llvm-libc-types.rlim_t564 .llvm-libc-types.struct_rlimit565)566 567add_header_macro(568 sys_stat569 ../libc/include/sys/stat.yaml570 sys/stat.h571 DEPENDS572 .llvm_libc_common_h573 .llvm-libc-macros.sys_stat_macros574 .llvm-libc-types.mode_t575 .llvm-libc-types.dev_t576 .llvm-libc-types.ino_t577 .llvm-libc-types.nlink_t578 .llvm-libc-types.uid_t579 .llvm-libc-types.gid_t580 .llvm-libc-types.off_t581 .llvm-libc-types.struct_timespec582 .llvm-libc-types.struct_timeval583 .llvm-libc-types.blksize_t584 .llvm-libc-types.blkcnt_t585 .llvm-libc-types.struct_stat586)587 588add_header_macro(589 sys_select590 ../libc/include/sys/select.yaml591 sys/select.h592 DEPENDS593 .llvm_libc_common_h594 .llvm-libc-macros.sys_select_macros595 .llvm-libc-types.fd_set596 .llvm-libc-types.sigset_t597 .llvm-libc-types.suseconds_t598 .llvm-libc-types.time_t599 .llvm-libc-types.struct_timespec600 .llvm-libc-types.struct_timeval601)602 603add_header_macro(604 sys_sendfile605 ../libc/include/sys/sendfile.yaml606 sys/sendfile.h607 DEPENDS608 .llvm_libc_common_h609 .llvm-libc-types.off_t610 .llvm-libc-types.size_t611 .llvm-libc-types.ssize_t612)613 614add_header_macro(615 sys_socket616 ../libc/include/sys/socket.yaml617 sys/socket.h618 DEPENDS619 .llvm_libc_common_h620 .llvm-libc-macros.sys_socket_macros621 .llvm-libc-types.sa_family_t622 .llvm-libc-types.socklen_t623 .llvm-libc-types.struct_iovec624 .llvm-libc-types.struct_msghdr625 .llvm-libc-types.struct_sockaddr626 .llvm-libc-types.struct_sockaddr_un627)628 629add_header_macro(630 sys_statvfs631 ../libc/include/sys/statvfs.yaml632 sys/statvfs.h633 DEPENDS634 .llvm_libc_common_h635 .llvm-libc-types.struct_statvfs636)637 638add_header_macro(639 sys_syscall640 ../libc/include/sys/syscall.yaml641 sys/syscall.h642 DEPENDS643)644 645add_header_macro(646 sys_time647 ../libc/include/sys/time.yaml648 sys/time.h649 DEPENDS650 .llvm_libc_common_h651 .llvm-libc-macros.sys_time_macros652 .llvm-libc-types.struct_itimerval653 .llvm-libc-types.struct_timeval654)655 656add_header_macro(657 sys_types658 ../libc/include/sys/types.yaml659 sys/types.h660 DEPENDS661 .llvm_libc_common_h662 .llvm-libc-types.blkcnt_t663 .llvm-libc-types.blksize_t664 .llvm-libc-types.clockid_t665 .llvm-libc-types.dev_t666 .llvm-libc-types.gid_t667 .llvm-libc-types.ino_t668 .llvm-libc-types.mode_t669 .llvm-libc-types.nlink_t670 .llvm-libc-types.off_t671 .llvm-libc-types.pid_t672 .llvm-libc-types.pthread_attr_t673 .llvm-libc-types.pthread_key_t674 .llvm-libc-types.pthread_mutex_t675 .llvm-libc-types.pthread_mutexattr_t676 .llvm-libc-types.pthread_once_t677 .llvm-libc-types.pthread_t678 .llvm-libc-types.size_t679 .llvm-libc-types.ssize_t680 .llvm-libc-types.suseconds_t681 .llvm-libc-types.time_t682 .llvm-libc-types.uid_t683)684 685add_header_macro(686 sys_utsname687 ../libc/include/sys/utsname.yaml688 sys/utsname.h689 DEPENDS690 .llvm_libc_common_h691 .llvm-libc-types.struct_utsname692)693 694add_header_macro(695 sys_uio696 ../libc/include/sys/uio.yaml697 sys/uio.h698 DEPENDS699 .llvm_libc_common_h700 .llvm-libc-types.struct_iovec701 .llvm-libc-types.ssize_t702)703 704add_header_macro(705 sys_wait706 ../libc/include/sys/wait.yaml707 sys/wait.h708 DEPENDS709 .llvm_libc_common_h710 .llvm-libc-macros.sys_wait_macros711 .llvm-libc-types.pid_t712 .llvm-libc-types.struct_rusage713 .llvm-libc-types.siginfo_t714)715 716add_header_macro(717 termios718 ../libc/include/termios.yaml719 termios.h720 DEPENDS721 .llvm_libc_common_h722 .llvm-libc-macros.termios_macros723 .llvm-libc-types.cc_t724 .llvm-libc-types.pid_t725 .llvm-libc-types.speed_t726 .llvm-libc-types.struct_termios727 .llvm-libc-types.tcflag_t728)729 730add_header_macro(731 uchar732 ../libc/include/uchar.yaml733 uchar.h734 DEPENDS735 .llvm_libc_common_h736 .llvm-libc-types.mbstate_t737 .llvm-libc-types.char8_t738 .llvm-libc-types.char16_t739 .llvm-libc-types.char32_t740)741 742add_header_macro(743 wchar744 ../libc/include/wchar.yaml745 wchar.h746 DEPENDS747 .llvm_libc_common_h748 .llvm-libc-macros.null_macro749 .llvm-libc-macros.wchar_macros750 .llvm-libc-types.mbstate_t751 .llvm-libc-types.size_t752 .llvm-libc-types.wint_t753 .llvm-libc-types.wchar_t754)755 756add_header_macro(757 wctype758 ../libc/include/wctype.yaml759 wctype.h760 DEPENDS761 .llvm_libc_common_h 762 .llvm-libc-types.wint_t763)764 765add_header_macro(766 locale767 ../libc/include/locale.yaml768 locale.h769 DEPENDS770 .llvm_libc_common_h771 .llvm-libc-macros.locale_macros772 .llvm-libc-macros.null_macro773 .llvm-libc-types.locale_t774 .llvm-libc-types.struct_lconv775)776 777add_header_macro(778 poll779 ../libc/include/poll.yaml780 poll.h781 DEPENDS782 .llvm-libc-types.struct_pollfd783 .llvm-libc-types.nfds_t784 .llvm-libc-macros.poll-macros785 )786 787add_header_macro(788 nl_types789 ../libc/include/nl_types.yaml790 nl_types.h791 DEPENDS792 .llvm-libc-macros.nl_types_macros793 .llvm-libc-types.nl_catd794 )795 796# UEFI spec references "Uefi.h" so we use that name for compatibility797add_header_macro(798 uefi799 ../libc/include/Uefi.yaml800 Uefi.h801 DEPENDS802 .llvm_libc_common_h803 .llvm-libc-types.EFI_GUID804 .llvm-libc-types.EFI_STATUS805 .llvm-libc-types.EFI_SYSTEM_TABLE806)807 808if(NOT LLVM_LIBC_FULL_BUILD)809 # We don't install headers in non-fullbuild mode.810 return()811endif()812 813function(get_all_install_header_targets out_var)814 set(all_deps ${ARGN})815 foreach(target IN LISTS ARGN)816 get_target_property(deps ${target} DEPS)817 if(NOT deps)818 continue()819 endif()820 list(APPEND all_deps ${deps})821 get_all_install_header_targets(nested_deps ${deps})822 list(APPEND all_deps ${nested_deps})823 endforeach()824 list(REMOVE_DUPLICATES all_deps)825 set(${out_var} ${all_deps} PARENT_SCOPE)826endfunction(get_all_install_header_targets)827 828get_all_install_header_targets(all_install_header_targets ${TARGET_PUBLIC_HEADERS})829add_library(libc-headers INTERFACE)830add_dependencies(libc-headers ${all_install_header_targets})831target_include_directories(libc-headers SYSTEM INTERFACE ${LIBC_INCLUDE_DIR})832 833foreach(target IN LISTS all_install_header_targets)834 get_target_property(header_file ${target} HEADER_FILE_PATH)835 if(NOT header_file)836 message(FATAL_ERROR "Installable header file '${target}' does not have the "837 "HEADER_FILE_PATH property set.")838 endif()839 file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_DIR} ${header_file})840 get_filename_component(nested_dir ${relative_path} DIRECTORY)841 install(FILES ${header_file}842 DESTINATION ${LIBC_INSTALL_INCLUDE_DIR}/${nested_dir}843 COMPONENT libc-headers)844 # The GPU optionally provides the supported declarations externally so845 # offloading languages like CUDA and OpenMP know what is supported by libc. We846 # install these in the compiler's resource directory at a preset location.847 if(LIBC_TARGET_OS_IS_GPU AND PACKAGE_VERSION)848 get_target_property(decls_file ${target} DECLS_FILE_PATH)849 if(NOT decls_file)850 continue()851 endif()852 get_clang_resource_dir(resource_dir SUBDIR include)853 file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_DIR} ${decls_file})854 get_filename_component(nested_dir ${relative_path} DIRECTORY)855 set(install_dir856 ${CMAKE_INSTALL_PREFIX}/${resource_dir}/llvm_libc_wrappers/${nested_dir})857 install(FILES ${decls_file}858 DESTINATION ${install_dir}859 COMPONENT libc-headers)860 endif()861endforeach()862 863if(LLVM_LIBC_FULL_BUILD)864 add_custom_target(install-libc-headers865 DEPENDS libc-headers866 COMMAND "${CMAKE_COMMAND}"867 -DCMAKE_INSTALL_COMPONENT=libc-headers868 -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")869 # Stripping is a no-op for headers870 add_custom_target(install-libc-headers-stripped DEPENDS install-libc-headers)871endif()872