Skip to content

Commit 06c831d

Browse files
[libc] rename newhdrgen to just hdrgen (#118545)
Link: #117208 Fixes: #117254
1 parent d5ba143 commit 06c831d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+115
-121
lines changed

libc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if(LIBC_BUILD_GPU_LOADER OR ((NOT LLVM_RUNTIMES_BUILD) AND LLVM_LIBC_GPU_BUILD))
5757
return()
5858
endif()
5959

60-
add_subdirectory(newhdrgen)
60+
add_subdirectory(hdrgen)
6161

6262
option(LIBC_CMAKE_VERBOSE_LOGGING
6363
"Log details warnings and notifications during CMake configuration." OFF)

libc/cmake/modules/LLVMLibCHeaderRules.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function(add_gen_header target_name)
112112

113113
add_custom_command(
114114
OUTPUT ${out_file}
115-
COMMAND ${Python3_EXECUTABLE} ${LIBC_SOURCE_DIR}/newhdrgen/yaml_to_classes.py
115+
COMMAND ${Python3_EXECUTABLE} ${LIBC_SOURCE_DIR}/hdrgen/yaml_to_classes.py
116116
${yaml_file}
117117
--h_def_file ${def_file}
118118
${entry_points}
@@ -126,7 +126,7 @@ function(add_gen_header target_name)
126126
set(decl_out_file ${LIBC_INCLUDE_DIR}/llvm-libc-decls/${relative_path})
127127
add_custom_command(
128128
OUTPUT ${decl_out_file}
129-
COMMAND ${Python3_EXECUTABLE} ${LIBC_SOURCE_DIR}/newhdrgen/yaml_to_classes.py
129+
COMMAND ${Python3_EXECUTABLE} ${LIBC_SOURCE_DIR}/hdrgen/yaml_to_classes.py
130130
${yaml_file}
131131
--export-decls
132132
${entry_points}

libc/docs/dev/header_generation.rst

Lines changed: 30 additions & 36 deletions

libc/docs/dev/source_tree_layout.rst

Lines changed: 3 additions & 3 deletions

libc/hdrgen/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
if(LLVM_LIBC_FULL_BUILD)
2+
enable_testing()
3+
4+
set(NEWHDGEN_TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
5+
set(TEST_OUTPUT_DIR ${CMAKE_BINARY_DIR}/hdrgen/output)
6+
7+
add_test(
8+
NAME hdrgen_integration_test
9+
COMMAND python3 ${NEWHDGEN_TESTS_DIR}/test_integration.py --output_dir ${TEST_OUTPUT_DIR}
10+
)
11+
12+
add_custom_target(check-hdrgen
13+
COMMAND ${CMAKE_CTEST_COMMAND} -R hdrgen_integration_test --output-on-failure
14+
)
15+
16+
message(STATUS "Integration test for hdrgen added.")
17+
endif()

0 commit comments

Comments
 (0)