[AVR] Fix LLD test (#106739)
[llvm-project.git] / libc / include / CMakeLists.txt
blob37cae19123318466b2af6389356d21aa92027b81
1 set(LIBC_INCLUDE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
2 set(LIBC_INCLUDE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
4 include(LLVMLibCHeaderRules)
6 # The GPU build wants to install files in the compiler's resource directory.
7 if(LIBC_TARGET_OS_IS_GPU)
8   include(GetClangResourceDir)
9 endif()
11 add_subdirectory(llvm-libc-macros)
12 add_subdirectory(llvm-libc-types)
14 add_header(
15   llvm_libc_common_h
16   HDR
17     __llvm-libc-common.h
20 macro(add_header_macro TARGET_NAME YAML_FILE DEF_FILE GEN_HDR DEPENDS)
21   if (LIBC_USE_NEW_HEADER_GEN)
22     add_gen_header2(
23       ${TARGET_NAME}
24       YAML_FILE ${YAML_FILE}
25       DEF_FILE ${DEF_FILE}
26       GEN_HDR ${GEN_HDR}
27       ${DEPENDS}
28       ${ARGN}
29     )
30   else()
31     add_gen_header(
32       ${TARGET_NAME}
33       DEF_FILE ${DEF_FILE}
34       GEN_HDR ${GEN_HDR}
35       ${DEPENDS}
36       ${ARGN}
37     )
38   endif()
39 endmacro()
41 add_header_macro(
42   ctype
43   ../libc/newhdrgen/yaml/ctype.yaml
44   ctype.h.def
45   ctype.h
46   DEPENDS
47     .llvm_libc_common_h
50 add_header_macro(
51   dirent
52   ../libc/newhdrgen/yaml/dirent.yaml
53   dirent.h.def
54   dirent.h
55   DEPENDS
56     .llvm_libc_common_h
57     .llvm-libc-types.ino_t
58     .llvm-libc-types.DIR
59     .llvm-libc-types.struct_dirent
62 add_header_macro(
63   fcntl
64   ../libc/newhdrgen/yaml/fcntl.yaml
65   fcntl.h.def
66   fcntl.h
67   DEPENDS
68     .llvm-libc-macros.fcntl_macros
69     .llvm-libc-types.mode_t
70     .llvm-libc-types.struct_flock
71     .llvm-libc-types.struct_flock64
72     .llvm-libc-types.off64_t
73     .llvm-libc-types.pid_t
74     .llvm-libc-types.off_t
75     .llvm_libc_common_h
78 add_header_macro(
79   dlfcn
80   ../libc/newhdrgen/yaml/dlfcn.yaml
81   dlfcn.h.def
82   dlfcn.h
83   DEPENDS
84     .llvm-libc-macros.dlfcn_macros
85     .llvm_libc_common_h
88 add_header_macro(
89   features
90   ../libc/newhdrgen/yaml/features.yaml
91   features.h.def
92   features.h
93   DEPENDS
94     .llvm_libc_common_h
95     .llvm-libc-macros.features_macros
98 add_header_macro(
99   fenv
100   ../libc/newhdrgen/yaml/fenv.yaml
101   fenv.h.def
102   fenv.h
103   DEPENDS
104     .llvm_libc_common_h
105     .llvm-libc-macros.fenv_macros
106     .llvm-libc-types.fenv_t
107     .llvm-libc-types.fexcept_t
110 add_header_macro(
111   inttypes
112   ../libc/newhdrgen/yaml/inttypes.yaml
113   inttypes.h.def
114   inttypes.h
115   DEPENDS
116     .llvm_libc_common_h
117     .llvm-libc-types.imaxdiv_t
118     .llvm-libc-macros.inttypes_macros
121 add_header_macro(
122   float
123   ../libc/newhdrgen/yaml/float.yaml
124   float.h.def
125   float.h
126   DEPENDS
127     .llvm-libc-macros.float_macros
130 add_header_macro(
131   stdint
132   ../libc/newhdrgen/yaml/stdint.yaml
133   stdint.h.def
134   stdint.h
135   DEPENDS
136     .llvm-libc-macros.stdint_macros
139 add_header_macro(
140   limits
141   ../libc/newhdrgen/yaml/limits.yaml
142   limits.h.def
143   limits.h
144   DEPENDS
145     .llvm-libc-macros.limits_macros
148 add_header_macro(
149   math
150   ../libc/newhdrgen/yaml/math.yaml
151   math.h.def
152   math.h
153   DEPENDS
154     .llvm_libc_common_h
155     .llvm-libc-macros.float16_macros
156     .llvm-libc-macros.math_macros
157     .llvm-libc-macros.math_function_macros
158     .llvm-libc-types.double_t
159     .llvm-libc-types.float_t
160     .llvm-libc-types.float128
163 add_header_macro(
164   stdfix
165   ../libc/newhdrgen/yaml/stdfix.yaml
166   stdfix.h.def
167   stdfix.h
168   DEPENDS
169     .llvm-libc-macros.stdfix_macros
172 # TODO: This should be conditional on POSIX networking being included.
173 file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/arpa)
175 add_header_macro(
176   arpa_inet
177   ../libc/newhdrgen/yaml/arpa/inet.yaml
178   arpa/inet.h.def
179   arpa/inet.h
180   DEPENDS
181     .llvm_libc_common_h
184 add_header_macro(
185   assert
186   ../libc/newhdrgen/yaml/assert.yaml
187   assert.h.def
188   assert.h
189   DEPENDS
190     .llvm_libc_common_h
191     .llvm-libc-macros.assert_macros
194 add_header_macro(
195   setjmp
196   ../libc/newhdrgen/yaml/setjmp.yaml
197   setjmp.h.def
198   setjmp.h
199   DEPENDS
200     .llvm_libc_common_h
201     .llvm-libc-types.jmp_buf
204 add_header_macro(
205   string
206   ../libc/newhdrgen/yaml/string.yaml
207   string.h.def
208   string.h
209   DEPENDS
210     .llvm_libc_common_h
211     .llvm-libc-macros.null_macro
212     .llvm-libc-types.size_t
215 add_header_macro(
216   strings
217   ../libc/newhdrgen/yaml/strings.yaml
218   strings.h.def
219   strings.h
220   DEPENDS
221     .llvm_libc_common_h
222     .llvm-libc-types.size_t
225 add_header_macro(
226   search
227   ../libc/newhdrgen/yaml/search.yaml
228   search.h.def
229   search.h
230   DEPENDS
231     .llvm_libc_common_h
232     .llvm-libc-types.ACTION
233     .llvm-libc-types.ENTRY
234     .llvm-libc-types.struct_hsearch_data
235     .llvm-libc-types.size_t
238 add_header_macro(
239   time
240   ../libc/newhdrgen/yaml/time.yaml
241   time.h.def
242   time.h
243   DEPENDS
244     .llvm_libc_common_h
245     .llvm-libc-macros.time_macros
246     .llvm-libc-types.clock_t
247     .llvm-libc-types.time_t
248     .llvm-libc-types.struct_tm
249     .llvm-libc-types.struct_timespec
250     .llvm-libc-types.struct_timeval
251     .llvm-libc-types.clockid_t
254 add_header_macro(
255   threads
256   ../libc/newhdrgen/yaml/threads.yaml
257   threads.h.def
258   threads.h
259   DEPENDS
260     .llvm_libc_common_h
261     .llvm-libc-types.__call_once_func_t
262     .llvm-libc-types.once_flag
263     .llvm-libc-types.cnd_t
264     .llvm-libc-types.mtx_t
265     .llvm-libc-types.thrd_t
266     .llvm-libc-types.thrd_start_t
267     .llvm-libc-types.tss_t
268     .llvm-libc-types.tss_dtor_t
271 add_header_macro(
272   errno
273   ../libc/newhdrgen/yaml/errno.yaml
274   errno.h.def
275   errno.h
276   DEPENDS
277     .llvm-libc-macros.generic_error_number_macros
278     .llvm-libc-macros.error_number_macros
281 add_header_macro(
282   signal
283   ../libc/newhdrgen/yaml/signal.yaml
284   signal.h.def
285   signal.h
286   DEPENDS
287     .llvm-libc-macros.signal_macros
288     .llvm-libc-types.sig_atomic_t
289     .llvm-libc-types.sigset_t
290     .llvm-libc-types.struct_sigaction
291     .llvm-libc-types.union_sigval
292     .llvm-libc-types.siginfo_t
293     .llvm-libc-types.stack_t
294     .llvm-libc-types.pid_t
297 add_header_macro(
298   stdbit
299   ../libc/newhdrgen/yaml/stdbit.yaml
300   stdbit.h.def
301   stdbit.h
302   DEPENDS
303     .llvm_libc_common_h
304     .llvm-libc-macros.stdbit_macros
307 add_header_macro(
308   stdckdint
309   ../libc/newhdrgen/yaml/stdckdint.yaml
310   stdckdint.h.def
311   stdckdint.h
312   DEPENDS
313     .llvm_libc_common_h
314     .llvm-libc-macros.stdckdint_macros
317 add_header_macro(
318   stdio
319   ../libc/newhdrgen/yaml/stdio.yaml
320   stdio.h.def
321   stdio.h
322   DEPENDS
323     .llvm-libc-macros.file_seek_macros
324     .llvm-libc-macros.stdio_macros
325     .llvm-libc-types.FILE
326     .llvm-libc-types.cookie_io_functions_t
327     .llvm-libc-types.off_t
328     .llvm-libc-types.size_t
329     .llvm-libc-types.ssize_t
330     .llvm_libc_common_h
333 add_header_macro(
334   stdlib
335   ../libc/newhdrgen/yaml/stdlib.yaml
336   stdlib.h.def
337   stdlib.h
338   DEPENDS
339     .llvm_libc_common_h
340     .llvm-libc-macros.stdlib_macros
341     .llvm-libc-types.div_t
342     .llvm-libc-types.ldiv_t
343     .llvm-libc-types.lldiv_t
344     .llvm-libc-types.size_t
345     .llvm-libc-types.__bsearchcompare_t
346     .llvm-libc-types.__qsortcompare_t
347     .llvm-libc-types.__qsortrcompare_t
348     .llvm-libc-types.__atexithandler_t
351 add_header_macro(
352   unistd
353   ../libc/newhdrgen/yaml/unistd.yaml
354   unistd.h.def
355   unistd.h
356   DEPENDS
357     .llvm_libc_common_h
358     .llvm-libc-macros.file_seek_macros
359     .llvm-libc-macros.unistd_macros
360     .llvm-libc-types.__exec_argv_t
361     .llvm-libc-types.__exec_envp_t
362     .llvm-libc-types.off_t
363     .llvm-libc-types.pid_t
364     .llvm-libc-types.size_t
365     .llvm-libc-types.ssize_t
366     .llvm-libc-types.uid_t
367     .llvm-libc-types.__getoptargv_t
370 add_header_macro(
371   pthread
372   ../libc/newhdrgen/yaml/pthread.yaml
373   pthread.h.def
374   pthread.h
375   DEPENDS
376     .llvm_libc_common_h
377     .llvm-libc-types.__atfork_callback_t
378     .llvm-libc-types.__pthread_once_func_t
379     .llvm-libc-types.__pthread_start_t
380     .llvm-libc-types.__pthread_tss_dtor_t
381     .llvm-libc-types.pthread_attr_t
382     .llvm-libc-types.pthread_condattr_t
383     .llvm-libc-types.pthread_key_t
384     .llvm-libc-types.pthread_mutex_t
385     .llvm-libc-types.pthread_mutexattr_t
386     .llvm-libc-types.pthread_once_t
387     .llvm-libc-types.pthread_rwlock_t
388     .llvm-libc-types.pthread_rwlockattr_t
389     .llvm-libc-types.pthread_t
392 add_header_macro(
393   sched
394   ../libc/newhdrgen/yaml/sched.yaml
395   sched.h.def
396   sched.h
397   DEPENDS
398     .llvm_libc_common_h
399     .llvm-libc-macros.sched_macros
400     .llvm-libc-types.cpu_set_t
401     .llvm-libc-types.pid_t
402     .llvm-libc-types.size_t
403     .llvm-libc-types.struct_sched_param
404     # Needed according to posix standard
405     .llvm-libc-types.time_t
406     .llvm-libc-types.struct_timespec
409 add_header_macro(
410   spawn
411   ../libc/newhdrgen/yaml/spawn.yaml
412   spawn.h.def
413   spawn.h
414   DEPENDS
415     .llvm_libc_common_h
416     .llvm-libc-types.mode_t
417     .llvm-libc-types.pid_t
418     .llvm-libc-types.posix_spawnattr_t
419     .llvm-libc-types.posix_spawn_file_actions_t
422 # TODO: Not all platforms will have a include/sys directory. Add the sys
423 # directory and the targets for sys/*.h files conditional to the OS requiring
424 # them.
425 file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/sys)
427 add_header_macro(
428   sys_auxv
429   ../libc/newhdrgen/yaml/sys/auxv.yaml
430   sys/auxv.h.def
431   sys/auxv.h
432   DEPENDS
433     .llvm_libc_common_h
434     .llvm-libc-macros.sys_auxv_macros
437 add_header_macro(
438   sys_epoll
439   ../libc/newhdrgen/yaml/sys/epoll.yaml
440   sys/epoll.h.def
441   sys/epoll.h
442   DEPENDS
443     .llvm_libc_common_h
444     .llvm-libc-types.struct_epoll_event
445     .llvm-libc-types.struct_epoll_data
446     .llvm-libc-types.sigset_t
447     .llvm-libc-macros.sys_epoll_macros
450 add_header_macro(
451   sys_ioctl
452   ../libc/newhdrgen/yaml/sys/ioctl.yaml
453   sys/ioctl.h.def
454   sys/ioctl.h
455   DEPENDS
456     .llvm_libc_common_h
457     .llvm-libc-macros.sys_ioctl_macros
460 add_header_macro(
461   sys_mman
462   ../libc/newhdrgen/yaml/sys/mman.yaml
463   sys/mman.h.def
464   sys/mman.h
465   DEPENDS
466     .llvm_libc_common_h
467     .llvm-libc-macros.sys_mman_macros
468     .llvm-libc-types.off_t
469     .llvm-libc-types.size_t
470     .llvm-libc-types.ssize_t
473 add_header_macro(
474   sys_prctl
475   ../libc/newhdrgen/yaml/sys/prctl.yaml
476   sys/prctl.h.def
477   sys/prctl.h
478   DEPENDS
479     .llvm_libc_common_h
482 add_header(
483   sys_queue
484   HDR
485     sys/queue.h
486   DEPENDS
487     .llvm-libc-macros.sys_queue_macros
490 add_header_macro(
491   sys_random
492   ../libc/newhdrgen/yaml/sys/random.yaml
493   sys/random.h.def
494   sys/random.h
495   DEPENDS
496     .llvm_libc_common_h
497     .llvm-libc-macros.sys_random_macros
498     .llvm-libc-types.size_t
499     .llvm-libc-types.ssize_t
502 add_header_macro(
503   sys_resource
504   ../libc/newhdrgen/yaml/sys/resource.yaml
505   sys/resource.h.def
506   sys/resource.h
507   DEPENDS
508     .llvm_libc_common_h
509     .llvm-libc-macros.sys_resource_macros
510     .llvm-libc-types.rlim_t
511     .llvm-libc-types.struct_rlimit
514 add_header_macro(
515   sys_stat
516   ../libc/newhdrgen/yaml/sys/stat.yaml
517   sys/stat.h.def
518   sys/stat.h
519   DEPENDS
520     .llvm_libc_common_h
521     .llvm-libc-macros.sys_stat_macros
522     .llvm-libc-types.mode_t
523     .llvm-libc-types.dev_t
524     .llvm-libc-types.ino_t
525     .llvm-libc-types.nlink_t
526     .llvm-libc-types.uid_t
527     .llvm-libc-types.gid_t
528     .llvm-libc-types.off_t
529     .llvm-libc-types.struct_timespec
530     .llvm-libc-types.struct_timeval
531     .llvm-libc-types.blksize_t
532     .llvm-libc-types.blkcnt_t
533     .llvm-libc-types.struct_stat
536 add_header_macro(
537   sys_select
538   ../libc/newhdrgen/yaml/sys/select.yaml
539   sys/select.h.def
540   sys/select.h
541   DEPENDS
542     .llvm_libc_common_h
543     .llvm-libc-macros.sys_select_macros
544     .llvm-libc-types.fd_set
545     .llvm-libc-types.sigset_t
546     .llvm-libc-types.suseconds_t
547     .llvm-libc-types.time_t
548     .llvm-libc-types.struct_timespec
549     .llvm-libc-types.struct_timeval
552 add_header_macro(
553   sys_sendfile
554   ../libc/newhdrgen/yaml/sys/sendfile.yaml
555   sys/sendfile.h.def
556   sys/sendfile.h
557   DEPENDS
558     .llvm_libc_common_h
559     .llvm-libc-types.off_t
560     .llvm-libc-types.size_t
561     .llvm-libc-types.ssize_t
564 add_header_macro(
565   sys_socket
566   ../libc/newhdrgen/yaml/sys/socket.yaml
567   sys/socket.h.def
568   sys/socket.h
569   DEPENDS
570     .llvm_libc_common_h
571     .llvm-libc-macros.sys_socket_macros
572     .llvm-libc-types.sa_family_t
573     .llvm-libc-types.socklen_t
574     .llvm-libc-types.struct_sockaddr
575     .llvm-libc-types.struct_sockaddr_un
578 add_header_macro(
579   sys_statvfs
580   ../libc/newhdrgen/yaml/sys/statvfs.yaml
581   sys/statvfs.h.def
582   sys/statvfs.h
583   DEPENDS
584     .llvm_libc_common_h
585     .llvm-libc-types.struct_statvfs
588 add_header_macro(
589   sys_syscall
590   ../libc/newhdrgen/yaml/sys/syscall.yaml
591   sys/syscall.h.def
592   sys/syscall.h
593   DEPENDS
596 add_header_macro(
597   sys_time
598   ../libc/newhdrgen/yaml/sys/time.yaml
599   sys/time.h.def
600   sys/time.h
601   DEPENDS
602     .llvm_libc_common_h
603     .llvm-libc-types.struct_timeval
604     .llvm-libc-macros.sys_time_macros
607 add_header_macro(
608   sys_types
609   ../libc/newhdrgen/yaml/sys/types.yaml
610   sys/types.h.def
611   sys/types.h
612   DEPENDS
613     .llvm_libc_common_h
614     .llvm-libc-types.blkcnt_t
615     .llvm-libc-types.blksize_t
616     .llvm-libc-types.clockid_t
617     .llvm-libc-types.dev_t
618     .llvm-libc-types.gid_t
619     .llvm-libc-types.ino_t
620     .llvm-libc-types.mode_t
621     .llvm-libc-types.nlink_t
622     .llvm-libc-types.off_t
623     .llvm-libc-types.pid_t
624     .llvm-libc-types.pthread_attr_t
625     .llvm-libc-types.pthread_key_t
626     .llvm-libc-types.pthread_mutex_t
627     .llvm-libc-types.pthread_mutexattr_t
628     .llvm-libc-types.pthread_once_t
629     .llvm-libc-types.pthread_t
630     .llvm-libc-types.size_t
631     .llvm-libc-types.ssize_t
632     .llvm-libc-types.suseconds_t
633     .llvm-libc-types.time_t
634     .llvm-libc-types.uid_t
637 add_header_macro(
638   sys_utsname
639   ../libc/newhdrgen/yaml/sys/utsname.yaml
640   sys/utsname.h.def
641   sys/utsname.h
642   DEPENDS
643     .llvm_libc_common_h
644     .llvm-libc-types.struct_utsname
647 add_header_macro(
648   sys_wait
649   ../libc/newhdrgen/yaml/sys/wait.yaml
650   sys/wait.h.def
651   sys/wait.h
652   DEPENDS
653     .llvm_libc_common_h
654     .llvm-libc-macros.sys_wait_macros
655     .llvm-libc-types.pid_t
656     .llvm-libc-types.struct_rusage
657     .llvm-libc-types.siginfo_t
660 add_header_macro(
661   termios
662   ../libc/newhdrgen/yaml/termios.yaml
663   termios.h.def
664   termios.h
665   DEPENDS
666     .llvm_libc_common_h
667     .llvm-libc-macros.termios_macros
668     .llvm-libc-types.cc_t
669     .llvm-libc-types.pid_t
670     .llvm-libc-types.speed_t
671     .llvm-libc-types.struct_termios
672     .llvm-libc-types.tcflag_t
675 add_header_macro(
676   uchar
677   ../libc/newhdrgen/yaml/uchar.yaml
678   uchar.h.def
679   uchar.h
680   DEPENDS
681     .llvm_libc_common_h
682     .llvm-libc-types.mbstate_t
683     .llvm-libc-types.char8_t
684     .llvm-libc-types.char16_t
685     .llvm-libc-types.char32_t
688 add_header_macro(
689   wchar
690   ../libc/newhdrgen/yaml/wchar.yaml
691   wchar.h.def
692   wchar.h
693   DEPENDS
694     .llvm_libc_common_h
695     .llvm-libc-macros.wchar_macros
696     .llvm-libc-types.mbstate_t
697     .llvm-libc-types.size_t
698     .llvm-libc-types.wint_t
699     .llvm-libc-types.wchar_t
702 if(LIBC_TARGET_OS_IS_GPU)
703   file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/gpu)
705   add_header_macro(
706     gpu_rpc
707     ../libc/newhdrgen/yaml/gpu/rpc.yaml
708     gpu/rpc.h.def
709     gpu/rpc.h
710     DEPENDS
711       .llvm_libc_common_h
712       .llvm-libc-types.rpc_opcodes_t
713   )
714 endif()
716 if(NOT LLVM_LIBC_FULL_BUILD)
717   # We don't install headers in non-fullbuild mode.
718   return()
719 endif()
721 function(get_all_install_header_targets out_var)
722   set(all_deps ${ARGN})
723   foreach(target IN LISTS ARGN)
724     get_target_property(deps ${target} DEPS)
725     if(NOT deps)
726       continue()
727     endif()
728     list(APPEND all_deps ${deps})
729     get_all_install_header_targets(nested_deps ${deps})
730     list(APPEND all_deps ${nested_deps})
731   endforeach()
732   list(REMOVE_DUPLICATES all_deps)
733   set(${out_var} ${all_deps} PARENT_SCOPE)
734 endfunction(get_all_install_header_targets)
736 get_all_install_header_targets(all_install_header_targets ${TARGET_PUBLIC_HEADERS})
737 add_library(libc-headers INTERFACE)
738 add_dependencies(libc-headers ${all_install_header_targets})
739 target_include_directories(libc-headers SYSTEM INTERFACE ${LIBC_INCLUDE_DIR})
741 foreach(target IN LISTS all_install_header_targets)
742   get_target_property(header_file ${target} HEADER_FILE_PATH)
743   if(NOT header_file)
744     message(FATAL_ERROR "Installable header file '${target}' does not have the "
745                         "HEADER_FILE_PATH property set.")
746   endif()
747   file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_DIR} ${header_file})
748   get_filename_component(nested_dir ${relative_path} DIRECTORY)
749   install(FILES ${header_file}
750           DESTINATION ${LIBC_INSTALL_INCLUDE_DIR}/${nested_dir}
751           COMPONENT libc-headers)
752   # The GPU optionally provides the supported declarations externally so
753   # offloading languages like CUDA and OpenMP know what is supported by libc. We
754   # install these in the compiler's resource directory at a preset location.
755   if(LIBC_TARGET_OS_IS_GPU AND PACKAGE_VERSION)
756     get_target_property(decls_file ${target} DECLS_FILE_PATH)
757     if(NOT decls_file)
758       continue()
759     endif()
760     get_clang_resource_dir(resource_dir SUBDIR include)
761     file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_DIR} ${decls_file})
762     get_filename_component(nested_dir ${relative_path} DIRECTORY)
763     set(install_dir
764         ${CMAKE_INSTALL_PREFIX}/${resource_dir}/llvm_libc_wrappers/${nested_dir})
765     install(FILES ${decls_file}
766             DESTINATION ${install_dir}
767             COMPONENT libc-headers)
768   endif()
769 endforeach()
771 if(LLVM_LIBC_FULL_BUILD)
772   add_custom_target(install-libc-headers
773                     DEPENDS libc-headers
774                     COMMAND "${CMAKE_COMMAND}"
775                             -DCMAKE_INSTALL_COMPONENT=libc-headers
776                             -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
777   # Stripping is a no-op for headers
778   add_custom_target(install-libc-headers-stripped DEPENDS install-libc-headers)
779 endif()