[libc-commits] [libc] [libc] Add limits.h header. (PR #78887)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Wed Jan 24 10:43:59 PST 2024


================
@@ -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()
----------------
nickdesaulniers wrote:

Question: is this exposing your newly added limits.h to the consumers of llvm-libc?

https://github.com/llvm/llvm-project/pull/78887


More information about the libc-commits mailing list