[libc-commits] [PATCH] D138142: [libc] Fix assert.h and ctype.h not being built

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Nov 16 09:30:49 PST 2022


jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, lntue, michaelrj.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.

The `assert.h` and `ctype.h` headers are never built despite their
entrypoints being present in the generated library. This patch adds a
dependency on these headers so that they will be built properly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138142

Files:
  libc/config/linux/aarch64/headers.txt
  libc/config/linux/x86_64/headers.txt
  libc/include/CMakeLists.txt
  libc/src/assert/CMakeLists.txt
  libc/src/ctype/CMakeLists.txt


Index: libc/src/ctype/CMakeLists.txt
===================================================================
--- libc/src/ctype/CMakeLists.txt
+++ libc/src/ctype/CMakeLists.txt
@@ -5,6 +5,7 @@
   HDRS
     isalnum.h
   DEPENDS
+    libc.include.ctype
     libc.src.__support.ctype_utils
 )
 
Index: libc/src/assert/CMakeLists.txt
===================================================================
--- libc/src/assert/CMakeLists.txt
+++ libc/src/assert/CMakeLists.txt
@@ -6,6 +6,7 @@
     __assert_fail.h
     assert.h
   DEPENDS
+    libc.include.assert
     libc.src.__support.OSUtil.osutil
     libc.src.stdlib.abort
 )
Index: libc/include/CMakeLists.txt
===================================================================
--- libc/include/CMakeLists.txt
+++ libc/include/CMakeLists.txt
@@ -69,7 +69,7 @@
 )
 
 add_gen_header(
-  assert_h
+  assert
   DEF_FILE assert.h.def
   GEN_HDR assert.h
   DEPENDS
Index: libc/config/linux/x86_64/headers.txt
===================================================================
--- libc/config/linux/x86_64/headers.txt
+++ libc/config/linux/x86_64/headers.txt
@@ -1,5 +1,5 @@
 set(TARGET_PUBLIC_HEADERS
-    libc.include.assert_h
+    libc.include.assert
     libc.include.ctype
     libc.include.dirent
     libc.include.errno
Index: libc/config/linux/aarch64/headers.txt
===================================================================
--- libc/config/linux/aarch64/headers.txt
+++ libc/config/linux/aarch64/headers.txt
@@ -1,5 +1,5 @@
 set(TARGET_PUBLIC_HEADERS
-    libc.include.assert_h
+    libc.include.assert
     libc.include.ctype
     libc.include.errno
     libc.include.fenv


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138142.475849.patch
Type: text/x-patch
Size: 1629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20221116/d968e046/attachment-0001.bin>


More information about the libc-commits mailing list