From dabb7514f562a3b5b8b9f360b8ca1f52cc5b741b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 16 Nov 2022 11:22:28 -0600 Subject: [PATCH] [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 --- libc/config/linux/aarch64/headers.txt | 2 +- libc/config/linux/x86_64/headers.txt | 2 +- libc/include/CMakeLists.txt | 2 +- libc/src/assert/CMakeLists.txt | 1 + libc/src/ctype/CMakeLists.txt | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libc/config/linux/aarch64/headers.txt b/libc/config/linux/aarch64/headers.txt index 2f9f41f8e1c5..e1af75fe84a7 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 a878e6d89e00..3ec9d6a43a05 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 f32c8e30902f..40adef0d051e 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 d3cf73e1df20..57ff9e97aa26 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 8dc2359e3f71..ae4eec9615dc 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 )