[libc-commits] [libc] dabb751 - [libc] Fix assert.h and ctype.h not being built

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Wed Nov 16 10:00:51 PST 2022


Author: Joseph Huber
Date: 2022-11-16T12:00:41-06:00
New Revision: dabb7514f562a3b5b8b9f360b8ca1f52cc5b741b

URL: https://github.com/llvm/llvm-project/commit/dabb7514f562a3b5b8b9f360b8ca1f52cc5b741b
DIFF: https://github.com/llvm/llvm-project/commit/dabb7514f562a3b5b8b9f360b8ca1f52cc5b741b.diff

LOG: [libc] Fix assert.h and ctype.h not being built

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.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D138142

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/libc/config/linux/aarch64/headers.txt b/libc/config/linux/aarch64/headers.txt
index 2f9f41f8e1c57..e1af75fe84a7e 100644
--- a/libc/config/linux/aarch64/headers.txt
+++ b/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

diff  --git a/libc/config/linux/x86_64/headers.txt b/libc/config/linux/x86_64/headers.txt
index a878e6d89e003..3ec9d6a43a05f 100644
--- a/libc/config/linux/x86_64/headers.txt
+++ b/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

diff  --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index f32c8e30902fb..40adef0d051eb 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -69,7 +69,7 @@ add_gen_header(
 )
 
 add_gen_header(
-  assert_h
+  assert
   DEF_FILE assert.h.def
   GEN_HDR assert.h
   DEPENDS

diff  --git a/libc/src/assert/CMakeLists.txt b/libc/src/assert/CMakeLists.txt
index d3cf73e1df209..57ff9e97aa263 100644
--- a/libc/src/assert/CMakeLists.txt
+++ b/libc/src/assert/CMakeLists.txt
@@ -6,6 +6,7 @@ add_entrypoint_object(
     __assert_fail.h
     assert.h
   DEPENDS
+    libc.include.assert
     libc.src.__support.OSUtil.osutil
     libc.src.stdlib.abort
 )

diff  --git a/libc/src/ctype/CMakeLists.txt b/libc/src/ctype/CMakeLists.txt
index 8dc2359e3f718..ae4eec9615dc1 100644
--- a/libc/src/ctype/CMakeLists.txt
+++ b/libc/src/ctype/CMakeLists.txt
@@ -5,6 +5,7 @@ add_entrypoint_object(
   HDRS
     isalnum.h
   DEPENDS
+    libc.include.ctype
     libc.src.__support.ctype_utils
 )
 


        


More information about the libc-commits mailing list