diff options
author | lntue <35648136+lntue@users.noreply.github.com> | 2024-01-24 16:08:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 16:08:56 -0500 |
commit | 72ce6294157964042b7ed5576ce2c99257eeea9d (patch) | |
tree | d68a30e06ad848ba10be6f4ceb7af42324da14bf /libc/cmake | |
parent | fe9f3903f2d61bc67bfee66b44872339c8c767bb (diff) | |
download | llvm-72ce6294157964042b7ed5576ce2c99257eeea9d.zip llvm-72ce6294157964042b7ed5576ce2c99257eeea9d.tar.gz llvm-72ce6294157964042b7ed5576ce2c99257eeea9d.tar.bz2 |
[libc] Add C23 limits.h header. (#78887)
Diffstat (limited to 'libc/cmake')
-rw-r--r-- | libc/cmake/modules/LLVMLibCLibraryRules.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake index e6cfd79..adb3bde 100644 --- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake +++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake @@ -173,7 +173,17 @@ function(create_header_library fq_target_name) target_sources(${fq_target_name} INTERFACE ${ADD_HEADER_HDRS}) if(ADD_HEADER_DEPENDS) add_dependencies(${fq_target_name} ${ADD_HEADER_DEPENDS}) - target_link_libraries(${fq_target_name} INTERFACE ${ADD_HEADER_DEPENDS}) + + # `*.__copied_hdr__` is created only to copy the header files to the target + # location, not to be linked against. + set(link_lib "") + foreach(dep ${ADD_HEADER_DEPENDS}) + if (NOT dep MATCHES "__copied_hdr__") + list(APPEND link_lib ${dep}) + endif() + endforeach() + + target_link_libraries(${fq_target_name} INTERFACE ${link_lib}) endif() if(ADD_HEADER_COMPILE_OPTIONS) target_compile_options(${fq_target_name} INTERFACE ${ADD_HEADER_COMPILE_OPTIONS}) |