Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion libc/cmake/modules/LLVMLibCHeaderRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag looks good, but you should add an option in the cmake to the top level CMakeLists: https://github.com/llvm/llvm-project/blob/main/libc/CMakeLists.txt#L138

Also the CONF options are intended to come from config.json, this user-exposed cmake flag can just be LIBC_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(
Expand Down
2 changes: 1 addition & 1 deletion libc/test/UnitTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
Loading