[libc-commits] [libc] [libc] Output all headers with LIBC_CONF_OUTPUT_ALL_HEADERS (PR #144114)
William Huynh via libc-commits
libc-commits at lists.llvm.org
Fri Jun 13 09:37:10 PDT 2025
https://github.com/saturn691 created https://github.com/llvm/llvm-project/pull/144114
Following discussion from https://discourse.llvm.org/t/missing-declarations-in-header-files/86678, we decided to add a flag to output all headers. Requires #144049.
- Allows outputting all headers
- Minor whitespace change for alignment
>From d3f4b77142d0db98ed46d3f62d5c24597acc87d8 Mon Sep 17 00:00:00 2001
From: William Huynh <William.Huynh at arm.com>
Date: Fri, 13 Jun 2025 17:33:29 +0100
Subject: [PATCH] [libc] Output all headers with LIBC_CONF_OUTPUT_ALL_HEADERS
---
libc/cmake/modules/LLVMLibCHeaderRules.cmake | 7 ++++++-
libc/test/UnitTest/CMakeLists.txt | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/libc/cmake/modules/LLVMLibCHeaderRules.cmake b/libc/cmake/modules/LLVMLibCHeaderRules.cmake
index 99f90244e0134..add58756dfc17 100644
--- a/libc/cmake/modules/LLVMLibCHeaderRules.cmake
+++ b/libc/cmake/modules/LLVMLibCHeaderRules.cmake
@@ -97,8 +97,13 @@ function(add_gen_header target_name)
set(out_file ${LIBC_INCLUDE_DIR}/${relative_path})
set(dep_file "${out_file}.d")
set(yaml_file ${CMAKE_SOURCE_DIR}/${ADD_GEN_HDR_YAML_FILE})
+
+ if(LIBC_CONF_OUTPUT_ALL_HEADERS)
+ set(entry_points "")
+ else()
+ set(entry_points "${TARGET_ENTRYPOINT_NAME_LIST}")
+ endif()
- set(entry_points "${TARGET_ENTRYPOINT_NAME_LIST}")
list(TRANSFORM entry_points PREPEND "--entry-point=")
add_custom_command(
diff --git a/libc/test/UnitTest/CMakeLists.txt b/libc/test/UnitTest/CMakeLists.txt
index b0a3a7431c222..c32809da577d4 100644
--- a/libc/test/UnitTest/CMakeLists.txt
+++ b/libc/test/UnitTest/CMakeLists.txt
@@ -35,7 +35,7 @@ function(add_unittest_framework_library name)
else()
_get_common_test_compile_options(compile_options "" "")
target_compile_options(${name}.unit PRIVATE ${compile_options})
-endif()
+ endif()
_get_hermetic_test_compile_options(compile_options "")
target_include_directories(${name}.hermetic PRIVATE ${LIBC_INCLUDE_DIR})
More information about the libc-commits
mailing list