From 52d4cc31a93e262fecb9b8c92e232c0799667bab Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Tue, 3 Dec 2024 13:13:12 -0800 Subject: [PATCH] [libc] rename newhdrgen to just hdrgen Link: 117208 Fixes: 117254 --- libc/CMakeLists.txt | 2 +- libc/cmake/modules/LLVMLibCHeaderRules.cmake | 4 +- libc/docs/dev/header_generation.rst | 66 +++++------ libc/docs/dev/source_tree_layout.rst | 6 +- libc/hdrgen/CMakeLists.txt | 17 +++ .../classes/enumeration.py | 0 .../class_implementation/classes/function.py | 0 .../class_implementation/classes/macro.py | 0 .../class_implementation/classes/object.py | 0 .../class_implementation/classes/type.py | 0 libc/{newhdrgen => hdrgen}/gpu_headers.py | 0 libc/{newhdrgen => hdrgen}/header.py | 0 .../tests/expected_output/test_header.h | 0 .../tests/input/test_small.h.def | 0 .../tests/input/test_small.yaml | 0 .../tests/test_integration.py | 10 +- .../{newhdrgen => hdrgen}/yaml/arpa/inet.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/assert.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/ctype.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/dirent.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/dlfcn.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/elf.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/errno.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/fcntl.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/features.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/fenv.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/float.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/gpu/rpc.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/inttypes.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/limits.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/link.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/locale.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/malloc.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/math.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/pthread.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/sched.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/search.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/setjmp.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/signal.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/spawn.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/stdbit.yaml | 0 .../{newhdrgen => hdrgen}/yaml/stdckdint.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/stdfix.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/stdint.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/stdio.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/stdlib.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/string.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/strings.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/sys/auxv.yaml | 0 .../{newhdrgen => hdrgen}/yaml/sys/epoll.yaml | 0 .../{newhdrgen => hdrgen}/yaml/sys/ioctl.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/sys/mman.yaml | 0 .../{newhdrgen => hdrgen}/yaml/sys/prctl.yaml | 0 .../yaml/sys/random.yaml | 0 .../yaml/sys/resource.yaml | 0 .../yaml/sys/select.yaml | 0 .../yaml/sys/sendfile.yaml | 0 .../yaml/sys/socket.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/sys/stat.yaml | 0 .../yaml/sys/statvfs.yaml | 0 .../yaml/sys/syscall.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/sys/time.yaml | 0 .../{newhdrgen => hdrgen}/yaml/sys/types.yaml | 0 .../yaml/sys/utsname.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/sys/wait.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/termios.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/threads.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/time.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/uchar.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/unistd.yaml | 0 libc/{newhdrgen => hdrgen}/yaml/wchar.yaml | 0 .../yaml_functions_sorted.py | 0 libc/{newhdrgen => hdrgen}/yaml_to_classes.py | 0 libc/include/CMakeLists.txt | 112 +++++++++--------- libc/newhdrgen/CMakeLists.txt | 17 --- libc/src/math/docs/add_math_function.md | 2 +- 76 files changed, 115 insertions(+), 121 deletions(-) create mode 100644 libc/hdrgen/CMakeLists.txt rename libc/{newhdrgen => hdrgen}/class_implementation/classes/enumeration.py (100%) rename libc/{newhdrgen => hdrgen}/class_implementation/classes/function.py (100%) rename libc/{newhdrgen => hdrgen}/class_implementation/classes/macro.py (100%) rename libc/{newhdrgen => hdrgen}/class_implementation/classes/object.py (100%) rename libc/{newhdrgen => hdrgen}/class_implementation/classes/type.py (100%) rename libc/{newhdrgen => hdrgen}/gpu_headers.py (100%) rename libc/{newhdrgen => hdrgen}/header.py (100%) rename libc/{newhdrgen => hdrgen}/tests/expected_output/test_header.h (100%) rename libc/{newhdrgen => hdrgen}/tests/input/test_small.h.def (100%) rename libc/{newhdrgen => hdrgen}/tests/input/test_small.yaml (100%) rename libc/{newhdrgen => hdrgen}/tests/test_integration.py (85%) rename libc/{newhdrgen => hdrgen}/yaml/arpa/inet.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/assert.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/ctype.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/dirent.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/dlfcn.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/elf.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/errno.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/fcntl.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/features.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/fenv.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/float.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/gpu/rpc.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/inttypes.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/limits.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/link.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/locale.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/malloc.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/math.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/pthread.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sched.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/search.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/setjmp.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/signal.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/spawn.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/stdbit.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/stdckdint.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/stdfix.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/stdint.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/stdio.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/stdlib.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/string.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/strings.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/auxv.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/epoll.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/ioctl.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/mman.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/prctl.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/random.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/resource.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/select.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/sendfile.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/socket.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/stat.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/statvfs.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/syscall.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/time.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/types.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/utsname.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/sys/wait.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/termios.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/threads.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/time.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/uchar.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/unistd.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml/wchar.yaml (100%) rename libc/{newhdrgen => hdrgen}/yaml_functions_sorted.py (100%) rename libc/{newhdrgen => hdrgen}/yaml_to_classes.py (100%) delete mode 100644 libc/newhdrgen/CMakeLists.txt diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt index fd82359022cff..13f2988aa0a50 100644 --- a/libc/CMakeLists.txt +++ b/libc/CMakeLists.txt @@ -70,7 +70,7 @@ if(LIBC_BUILD_GPU_LOADER OR NOT LLVM_RUNTIMES_BUILD) endif() endif() -add_subdirectory(newhdrgen) +add_subdirectory(hdrgen) option(LIBC_CMAKE_VERBOSE_LOGGING "Log details warnings and notifications during CMake configuration." OFF) diff --git a/libc/cmake/modules/LLVMLibCHeaderRules.cmake b/libc/cmake/modules/LLVMLibCHeaderRules.cmake index 8f24cd4b3023b..31a88f0ef93be 100644 --- a/libc/cmake/modules/LLVMLibCHeaderRules.cmake +++ b/libc/cmake/modules/LLVMLibCHeaderRules.cmake @@ -112,7 +112,7 @@ function(add_gen_header target_name) add_custom_command( OUTPUT ${out_file} - COMMAND ${Python3_EXECUTABLE} ${LIBC_SOURCE_DIR}/newhdrgen/yaml_to_classes.py + COMMAND ${Python3_EXECUTABLE} ${LIBC_SOURCE_DIR}/hdrgen/yaml_to_classes.py ${yaml_file} --h_def_file ${def_file} ${entry_points} @@ -126,7 +126,7 @@ function(add_gen_header target_name) set(decl_out_file ${LIBC_INCLUDE_DIR}/llvm-libc-decls/${relative_path}) add_custom_command( OUTPUT ${decl_out_file} - COMMAND ${Python3_EXECUTABLE} ${LIBC_SOURCE_DIR}/newhdrgen/yaml_to_classes.py + COMMAND ${Python3_EXECUTABLE} ${LIBC_SOURCE_DIR}/hdrgen/yaml_to_classes.py ${yaml_file} --export-decls ${entry_points} diff --git a/libc/docs/dev/header_generation.rst b/libc/docs/dev/header_generation.rst index 0730b9a40c26a..2c586cc87b699 100644 --- a/libc/docs/dev/header_generation.rst +++ b/libc/docs/dev/header_generation.rst @@ -3,21 +3,15 @@ Generating Public and Internal headers ====================================== -This is a new implementation of the previous libc header generator. The old -header generator (libc-hdrgen aka "Headergen") was based on TableGen, which -created an awkward dependency on the rest of LLVM for our build system. By -creating a new standalone Headergen we can eliminate these dependencies for -easier cross compatibility. - -There are 3 main components of the new Headergen. The first component are the -YAML files that contain all the function header information and are separated by -header specification and standard. The second component are the classes that are -created for each component of the function header: macros, enumerations, types, -function, arguments, and objects. The third component is the Python script that -uses the class representation to deserialize YAML files into its specific -components and then reserializes the components into the function header. The -Python script also combines the generated header content with header definitions -and extra macro and type inclusions from the .h.def file. +There are 3 main components of the Headergen. The first component are the YAML +files that contain all the function header information and are separated by +header specification and standard. The second component are the classes that +are created for each component of the function header: macros, enumerations, +types, function, arguments, and objects. The third component is the Python +script that uses the class representation to deserialize YAML files into its +specific components and then reserializes the components into the function +header. The Python script also combines the generated header content with +header definitions and extra macro and type inclusions from the .h.def file. Instructions @@ -30,7 +24,7 @@ Required Versions: 1. Keep full-build mode on when building, otherwise headers will not be generated. 2. Once the build is complete, enter in the command line within the build - directory ``ninja check-newhdrgen`` to ensure that the integration tests are + directory ``ninja check-hdrgen`` to ensure that the integration tests are passing. 3. Then enter in the command line ``ninja libc`` to generate headers. Headers will be in ``build/projects/libc/include`` or ``build/libc/include`` in a @@ -50,41 +44,41 @@ To add through the command line: .. code-block:: none - python3 libc/newhdrgen/yaml_to_classes.py - libc/newhdrgen/yaml/[yaml_file.yaml] --add_function "" "" + python3 libc/hdrgen/yaml_to_classes.py + libc/hdrgen/yaml/[yaml_file.yaml] --add_function "" "" Example: .. code-block:: none - python3 libc/newhdrgen/yaml_to_classes.py - libc/newhdrgen/yaml/ctype.yaml --add_function "char" example_function + python3 libc/hdrgen/yaml_to_classes.py + libc/hdrgen/yaml/ctype.yaml --add_function "char" example_function "int, void, const void" stdc example_float example_attribute Keep in mind only the return_type and arguments have quotes around them. If you do not have any guards or attributes you may enter "null" for both. 3. Check the YAML file that the added function is present. You will also get a - generated header file with the new addition in the newhdrgen directory to + generated header file with the new addition in the hdrgen directory to examine. -If you want to sort the functions alphabetically you can check out libc/newhdrgen/yaml_functions_sorted.py. +If you want to sort the functions alphabetically you can check out libc/hdrgen/yaml_functions_sorted.py. Testing ------- -New Headergen has an integration test that you may run once you have configured -your CMake within the build directory. In the command line, enter the following: -``ninja check-newhdrgen``. The integration test is one test that ensures the -process of YAML to classes to generate headers works properly. If there are any -new additions on formatting headers, make sure the test is updated with the -specific addition. +Headergen has an integration test that you may run once you have configured +your CMake within the build directory. In the command line, enter the +following: ``ninja check-hdrgen``. The integration test is one test that +ensures the process of YAML to classes to generate headers works properly. If +there are any new additions on formatting headers, make sure the test is +updated with the specific addition. -Integration Test can be found in: ``libc/newhdrgen/tests/test_integration.py`` +Integration Test can be found in: ``libc/hdrgen/tests/test_integration.py`` File to modify if adding something to formatting: -``libc/newhdrgen/tests/expected_output/test_header.h`` +``libc/hdrgen/tests/expected_output/test_header.h`` Common Errors @@ -95,7 +89,7 @@ Common Errors .. code-block:: none - "/llvm-project/libc/newhdrgen/yaml_to_classes.py", line 67, in yaml_to_classes function_data["return_type"] + "/llvm-project/libc/hdrgen/yaml_to_classes.py", line 67, in yaml_to_classes function_data["return_type"] If you receive this error or any error pertaining to ``function_data[function_specific_component]`` while building the headers @@ -123,7 +117,7 @@ Common Errors missing. Ensure the correct style and required files are present: | ``[header_name]`` - | ``[../libc/newhdrgen/yaml/[yaml_file.yaml]`` + | ``[../libc/hdrgen/yaml/[yaml_file.yaml]`` | ``[header_name.h.def]`` | ``[header_name.h]`` | ``DEPENDS`` @@ -153,13 +147,13 @@ Common Errors .. code-block:: none - File "/llvm-project/libc/newhdrgen/header.py", line 60, in __str__ for + File "/llvm-project/libc/hdrgen/header.py", line 60, in __str__ for function in self.functions: AttributeError: 'HeaderFile' object has no attribute 'functions' When running ``ninja libc`` in the build directory to generate headers you may receive the error above. Essentially this means that in - ``libc/newhdrgen/header.py`` there is a missing attribute named functions. + ``libc/hdrgen/header.py`` there is a missing attribute named functions. Make sure all function components are defined within this file and there are no missing functions to add these components. @@ -190,12 +184,12 @@ Common Errors Sometimes the integration test will fail but that still means the process is working unless the comparison between the output and expected_output is not showing. If that is the case make sure in - ``libc/newhdrgen/tests/test_integration.py`` there are no missing arguments + ``libc/hdrgen/tests/test_integration.py`` there are no missing arguments that run through the script. If the integration tests are failing due to mismatching of lines or small errors in spacing that is nothing to worry about. If this is happening while you are making a new change to the formatting of the headers, then ensure the expected output file - ``libc/newhdrgen/tests/expected_output/test_header.h`` has the changes you + ``libc/hdrgen/tests/expected_output/test_header.h`` has the changes you are applying. diff --git a/libc/docs/dev/source_tree_layout.rst b/libc/docs/dev/source_tree_layout.rst index 8b423a1712cc8..0010f138317b5 100644 --- a/libc/docs/dev/source_tree_layout.rst +++ b/libc/docs/dev/source_tree_layout.rst @@ -15,9 +15,9 @@ directories:: - examples - fuzzing - hdr + - hdrgen - include - lib - - newhdrgen - src - startup - test @@ -89,13 +89,13 @@ The ``lib`` directory This directory contains a ``CMakeLists.txt`` file listing the targets for the public libraries ``libc.a``, ``libm.a`` etc. -The ``newhdrgen`` directory +The ``hdrgen`` directory --------------------------- This directory contains the sources and specifications for the types, macros and entrypoint functions. These definitions are organized in the ``yaml`` subdirectory and match the organization of the ``*.h.def`` files. This folder -also contains the python sources for new headergen, which is what generates the +also contains the python sources for headergen, which is what generates the headers. The ``src`` directory diff --git a/libc/hdrgen/CMakeLists.txt b/libc/hdrgen/CMakeLists.txt new file mode 100644 index 0000000000000..8ebde4e3e4588 --- /dev/null +++ b/libc/hdrgen/CMakeLists.txt @@ -0,0 +1,17 @@ +if(LLVM_LIBC_FULL_BUILD) + enable_testing() + + set(NEWHDGEN_TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests) + set(TEST_OUTPUT_DIR ${CMAKE_BINARY_DIR}/hdrgen/output) + + add_test( + NAME hdrgen_integration_test + COMMAND python3 ${NEWHDGEN_TESTS_DIR}/test_integration.py --output_dir ${TEST_OUTPUT_DIR} + ) + + add_custom_target(check-hdrgen + COMMAND ${CMAKE_CTEST_COMMAND} -R hdrgen_integration_test --output-on-failure + ) + + message(STATUS "Integration test for hdrgen added.") +endif() diff --git a/libc/newhdrgen/class_implementation/classes/enumeration.py b/libc/hdrgen/class_implementation/classes/enumeration.py similarity index 100% rename from libc/newhdrgen/class_implementation/classes/enumeration.py rename to libc/hdrgen/class_implementation/classes/enumeration.py diff --git a/libc/newhdrgen/class_implementation/classes/function.py b/libc/hdrgen/class_implementation/classes/function.py similarity index 100% rename from libc/newhdrgen/class_implementation/classes/function.py rename to libc/hdrgen/class_implementation/classes/function.py diff --git a/libc/newhdrgen/class_implementation/classes/macro.py b/libc/hdrgen/class_implementation/classes/macro.py similarity index 100% rename from libc/newhdrgen/class_implementation/classes/macro.py rename to libc/hdrgen/class_implementation/classes/macro.py diff --git a/libc/newhdrgen/class_implementation/classes/object.py b/libc/hdrgen/class_implementation/classes/object.py similarity index 100% rename from libc/newhdrgen/class_implementation/classes/object.py rename to libc/hdrgen/class_implementation/classes/object.py diff --git a/libc/newhdrgen/class_implementation/classes/type.py b/libc/hdrgen/class_implementation/classes/type.py similarity index 100% rename from libc/newhdrgen/class_implementation/classes/type.py rename to libc/hdrgen/class_implementation/classes/type.py diff --git a/libc/newhdrgen/gpu_headers.py b/libc/hdrgen/gpu_headers.py similarity index 100% rename from libc/newhdrgen/gpu_headers.py rename to libc/hdrgen/gpu_headers.py diff --git a/libc/newhdrgen/header.py b/libc/hdrgen/header.py similarity index 100% rename from libc/newhdrgen/header.py rename to libc/hdrgen/header.py diff --git a/libc/newhdrgen/tests/expected_output/test_header.h b/libc/hdrgen/tests/expected_output/test_header.h similarity index 100% rename from libc/newhdrgen/tests/expected_output/test_header.h rename to libc/hdrgen/tests/expected_output/test_header.h diff --git a/libc/newhdrgen/tests/input/test_small.h.def b/libc/hdrgen/tests/input/test_small.h.def similarity index 100% rename from libc/newhdrgen/tests/input/test_small.h.def rename to libc/hdrgen/tests/input/test_small.h.def diff --git a/libc/newhdrgen/tests/input/test_small.yaml b/libc/hdrgen/tests/input/test_small.yaml similarity index 100% rename from libc/newhdrgen/tests/input/test_small.yaml rename to libc/hdrgen/tests/input/test_small.yaml diff --git a/libc/newhdrgen/tests/test_integration.py b/libc/hdrgen/tests/test_integration.py similarity index 85% rename from libc/newhdrgen/tests/test_integration.py rename to libc/hdrgen/tests/test_integration.py index 33353785af233..8ea6d8a708073 100644 --- a/libc/newhdrgen/tests/test_integration.py +++ b/libc/hdrgen/tests/test_integration.py @@ -9,7 +9,7 @@ class TestHeaderGenIntegration(unittest.TestCase): def setUp(self): self.output_dir = Path( - args.output_dir if args.output_dir else "libc/newhdrgen/tests/output" + args.output_dir if args.output_dir else "libc/hdrgen/tests/output" ) self.maxDiff = None @@ -21,7 +21,7 @@ def run_script(self, yaml_file, h_def_file, output_dir, entry_points): h_def_file = self.source_dir / h_def_file command = [ "python3", - str(self.source_dir / "libc/newhdrgen/yaml_to_classes.py"), + str(self.source_dir / "libc/hdrgen/yaml_to_classes.py"), str(yaml_file), "--h_def_file", str(h_def_file), @@ -51,10 +51,10 @@ def compare_files(self, generated_file, expected_file): self.assertEqual(gen_content, exp_content) def test_generate_header(self): - yaml_file = "libc/newhdrgen/tests/input/test_small.yaml" - h_def_file = "libc/newhdrgen/tests/input/test_small.h.def" + yaml_file = "libc/hdrgen/tests/input/test_small.yaml" + h_def_file = "libc/hdrgen/tests/input/test_small.h.def" expected_output_file = ( - self.source_dir / "libc/newhdrgen/tests/expected_output/test_header.h" + self.source_dir / "libc/hdrgen/tests/expected_output/test_header.h" ) output_file = self.output_dir / "test_small.h" entry_points = {"func_b", "func_a", "func_c", "func_d", "func_e"} diff --git a/libc/newhdrgen/yaml/arpa/inet.yaml b/libc/hdrgen/yaml/arpa/inet.yaml similarity index 100% rename from libc/newhdrgen/yaml/arpa/inet.yaml rename to libc/hdrgen/yaml/arpa/inet.yaml diff --git a/libc/newhdrgen/yaml/assert.yaml b/libc/hdrgen/yaml/assert.yaml similarity index 100% rename from libc/newhdrgen/yaml/assert.yaml rename to libc/hdrgen/yaml/assert.yaml diff --git a/libc/newhdrgen/yaml/ctype.yaml b/libc/hdrgen/yaml/ctype.yaml similarity index 100% rename from libc/newhdrgen/yaml/ctype.yaml rename to libc/hdrgen/yaml/ctype.yaml diff --git a/libc/newhdrgen/yaml/dirent.yaml b/libc/hdrgen/yaml/dirent.yaml similarity index 100% rename from libc/newhdrgen/yaml/dirent.yaml rename to libc/hdrgen/yaml/dirent.yaml diff --git a/libc/newhdrgen/yaml/dlfcn.yaml b/libc/hdrgen/yaml/dlfcn.yaml similarity index 100% rename from libc/newhdrgen/yaml/dlfcn.yaml rename to libc/hdrgen/yaml/dlfcn.yaml diff --git a/libc/newhdrgen/yaml/elf.yaml b/libc/hdrgen/yaml/elf.yaml similarity index 100% rename from libc/newhdrgen/yaml/elf.yaml rename to libc/hdrgen/yaml/elf.yaml diff --git a/libc/newhdrgen/yaml/errno.yaml b/libc/hdrgen/yaml/errno.yaml similarity index 100% rename from libc/newhdrgen/yaml/errno.yaml rename to libc/hdrgen/yaml/errno.yaml diff --git a/libc/newhdrgen/yaml/fcntl.yaml b/libc/hdrgen/yaml/fcntl.yaml similarity index 100% rename from libc/newhdrgen/yaml/fcntl.yaml rename to libc/hdrgen/yaml/fcntl.yaml diff --git a/libc/newhdrgen/yaml/features.yaml b/libc/hdrgen/yaml/features.yaml similarity index 100% rename from libc/newhdrgen/yaml/features.yaml rename to libc/hdrgen/yaml/features.yaml diff --git a/libc/newhdrgen/yaml/fenv.yaml b/libc/hdrgen/yaml/fenv.yaml similarity index 100% rename from libc/newhdrgen/yaml/fenv.yaml rename to libc/hdrgen/yaml/fenv.yaml diff --git a/libc/newhdrgen/yaml/float.yaml b/libc/hdrgen/yaml/float.yaml similarity index 100% rename from libc/newhdrgen/yaml/float.yaml rename to libc/hdrgen/yaml/float.yaml diff --git a/libc/newhdrgen/yaml/gpu/rpc.yaml b/libc/hdrgen/yaml/gpu/rpc.yaml similarity index 100% rename from libc/newhdrgen/yaml/gpu/rpc.yaml rename to libc/hdrgen/yaml/gpu/rpc.yaml diff --git a/libc/newhdrgen/yaml/inttypes.yaml b/libc/hdrgen/yaml/inttypes.yaml similarity index 100% rename from libc/newhdrgen/yaml/inttypes.yaml rename to libc/hdrgen/yaml/inttypes.yaml diff --git a/libc/newhdrgen/yaml/limits.yaml b/libc/hdrgen/yaml/limits.yaml similarity index 100% rename from libc/newhdrgen/yaml/limits.yaml rename to libc/hdrgen/yaml/limits.yaml diff --git a/libc/newhdrgen/yaml/link.yaml b/libc/hdrgen/yaml/link.yaml similarity index 100% rename from libc/newhdrgen/yaml/link.yaml rename to libc/hdrgen/yaml/link.yaml diff --git a/libc/newhdrgen/yaml/locale.yaml b/libc/hdrgen/yaml/locale.yaml similarity index 100% rename from libc/newhdrgen/yaml/locale.yaml rename to libc/hdrgen/yaml/locale.yaml diff --git a/libc/newhdrgen/yaml/malloc.yaml b/libc/hdrgen/yaml/malloc.yaml similarity index 100% rename from libc/newhdrgen/yaml/malloc.yaml rename to libc/hdrgen/yaml/malloc.yaml diff --git a/libc/newhdrgen/yaml/math.yaml b/libc/hdrgen/yaml/math.yaml similarity index 100% rename from libc/newhdrgen/yaml/math.yaml rename to libc/hdrgen/yaml/math.yaml diff --git a/libc/newhdrgen/yaml/pthread.yaml b/libc/hdrgen/yaml/pthread.yaml similarity index 100% rename from libc/newhdrgen/yaml/pthread.yaml rename to libc/hdrgen/yaml/pthread.yaml diff --git a/libc/newhdrgen/yaml/sched.yaml b/libc/hdrgen/yaml/sched.yaml similarity index 100% rename from libc/newhdrgen/yaml/sched.yaml rename to libc/hdrgen/yaml/sched.yaml diff --git a/libc/newhdrgen/yaml/search.yaml b/libc/hdrgen/yaml/search.yaml similarity index 100% rename from libc/newhdrgen/yaml/search.yaml rename to libc/hdrgen/yaml/search.yaml diff --git a/libc/newhdrgen/yaml/setjmp.yaml b/libc/hdrgen/yaml/setjmp.yaml similarity index 100% rename from libc/newhdrgen/yaml/setjmp.yaml rename to libc/hdrgen/yaml/setjmp.yaml diff --git a/libc/newhdrgen/yaml/signal.yaml b/libc/hdrgen/yaml/signal.yaml similarity index 100% rename from libc/newhdrgen/yaml/signal.yaml rename to libc/hdrgen/yaml/signal.yaml diff --git a/libc/newhdrgen/yaml/spawn.yaml b/libc/hdrgen/yaml/spawn.yaml similarity index 100% rename from libc/newhdrgen/yaml/spawn.yaml rename to libc/hdrgen/yaml/spawn.yaml diff --git a/libc/newhdrgen/yaml/stdbit.yaml b/libc/hdrgen/yaml/stdbit.yaml similarity index 100% rename from libc/newhdrgen/yaml/stdbit.yaml rename to libc/hdrgen/yaml/stdbit.yaml diff --git a/libc/newhdrgen/yaml/stdckdint.yaml b/libc/hdrgen/yaml/stdckdint.yaml similarity index 100% rename from libc/newhdrgen/yaml/stdckdint.yaml rename to libc/hdrgen/yaml/stdckdint.yaml diff --git a/libc/newhdrgen/yaml/stdfix.yaml b/libc/hdrgen/yaml/stdfix.yaml similarity index 100% rename from libc/newhdrgen/yaml/stdfix.yaml rename to libc/hdrgen/yaml/stdfix.yaml diff --git a/libc/newhdrgen/yaml/stdint.yaml b/libc/hdrgen/yaml/stdint.yaml similarity index 100% rename from libc/newhdrgen/yaml/stdint.yaml rename to libc/hdrgen/yaml/stdint.yaml diff --git a/libc/newhdrgen/yaml/stdio.yaml b/libc/hdrgen/yaml/stdio.yaml similarity index 100% rename from libc/newhdrgen/yaml/stdio.yaml rename to libc/hdrgen/yaml/stdio.yaml diff --git a/libc/newhdrgen/yaml/stdlib.yaml b/libc/hdrgen/yaml/stdlib.yaml similarity index 100% rename from libc/newhdrgen/yaml/stdlib.yaml rename to libc/hdrgen/yaml/stdlib.yaml diff --git a/libc/newhdrgen/yaml/string.yaml b/libc/hdrgen/yaml/string.yaml similarity index 100% rename from libc/newhdrgen/yaml/string.yaml rename to libc/hdrgen/yaml/string.yaml diff --git a/libc/newhdrgen/yaml/strings.yaml b/libc/hdrgen/yaml/strings.yaml similarity index 100% rename from libc/newhdrgen/yaml/strings.yaml rename to libc/hdrgen/yaml/strings.yaml diff --git a/libc/newhdrgen/yaml/sys/auxv.yaml b/libc/hdrgen/yaml/sys/auxv.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/auxv.yaml rename to libc/hdrgen/yaml/sys/auxv.yaml diff --git a/libc/newhdrgen/yaml/sys/epoll.yaml b/libc/hdrgen/yaml/sys/epoll.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/epoll.yaml rename to libc/hdrgen/yaml/sys/epoll.yaml diff --git a/libc/newhdrgen/yaml/sys/ioctl.yaml b/libc/hdrgen/yaml/sys/ioctl.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/ioctl.yaml rename to libc/hdrgen/yaml/sys/ioctl.yaml diff --git a/libc/newhdrgen/yaml/sys/mman.yaml b/libc/hdrgen/yaml/sys/mman.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/mman.yaml rename to libc/hdrgen/yaml/sys/mman.yaml diff --git a/libc/newhdrgen/yaml/sys/prctl.yaml b/libc/hdrgen/yaml/sys/prctl.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/prctl.yaml rename to libc/hdrgen/yaml/sys/prctl.yaml diff --git a/libc/newhdrgen/yaml/sys/random.yaml b/libc/hdrgen/yaml/sys/random.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/random.yaml rename to libc/hdrgen/yaml/sys/random.yaml diff --git a/libc/newhdrgen/yaml/sys/resource.yaml b/libc/hdrgen/yaml/sys/resource.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/resource.yaml rename to libc/hdrgen/yaml/sys/resource.yaml diff --git a/libc/newhdrgen/yaml/sys/select.yaml b/libc/hdrgen/yaml/sys/select.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/select.yaml rename to libc/hdrgen/yaml/sys/select.yaml diff --git a/libc/newhdrgen/yaml/sys/sendfile.yaml b/libc/hdrgen/yaml/sys/sendfile.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/sendfile.yaml rename to libc/hdrgen/yaml/sys/sendfile.yaml diff --git a/libc/newhdrgen/yaml/sys/socket.yaml b/libc/hdrgen/yaml/sys/socket.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/socket.yaml rename to libc/hdrgen/yaml/sys/socket.yaml diff --git a/libc/newhdrgen/yaml/sys/stat.yaml b/libc/hdrgen/yaml/sys/stat.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/stat.yaml rename to libc/hdrgen/yaml/sys/stat.yaml diff --git a/libc/newhdrgen/yaml/sys/statvfs.yaml b/libc/hdrgen/yaml/sys/statvfs.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/statvfs.yaml rename to libc/hdrgen/yaml/sys/statvfs.yaml diff --git a/libc/newhdrgen/yaml/sys/syscall.yaml b/libc/hdrgen/yaml/sys/syscall.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/syscall.yaml rename to libc/hdrgen/yaml/sys/syscall.yaml diff --git a/libc/newhdrgen/yaml/sys/time.yaml b/libc/hdrgen/yaml/sys/time.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/time.yaml rename to libc/hdrgen/yaml/sys/time.yaml diff --git a/libc/newhdrgen/yaml/sys/types.yaml b/libc/hdrgen/yaml/sys/types.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/types.yaml rename to libc/hdrgen/yaml/sys/types.yaml diff --git a/libc/newhdrgen/yaml/sys/utsname.yaml b/libc/hdrgen/yaml/sys/utsname.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/utsname.yaml rename to libc/hdrgen/yaml/sys/utsname.yaml diff --git a/libc/newhdrgen/yaml/sys/wait.yaml b/libc/hdrgen/yaml/sys/wait.yaml similarity index 100% rename from libc/newhdrgen/yaml/sys/wait.yaml rename to libc/hdrgen/yaml/sys/wait.yaml diff --git a/libc/newhdrgen/yaml/termios.yaml b/libc/hdrgen/yaml/termios.yaml similarity index 100% rename from libc/newhdrgen/yaml/termios.yaml rename to libc/hdrgen/yaml/termios.yaml diff --git a/libc/newhdrgen/yaml/threads.yaml b/libc/hdrgen/yaml/threads.yaml similarity index 100% rename from libc/newhdrgen/yaml/threads.yaml rename to libc/hdrgen/yaml/threads.yaml diff --git a/libc/newhdrgen/yaml/time.yaml b/libc/hdrgen/yaml/time.yaml similarity index 100% rename from libc/newhdrgen/yaml/time.yaml rename to libc/hdrgen/yaml/time.yaml diff --git a/libc/newhdrgen/yaml/uchar.yaml b/libc/hdrgen/yaml/uchar.yaml similarity index 100% rename from libc/newhdrgen/yaml/uchar.yaml rename to libc/hdrgen/yaml/uchar.yaml diff --git a/libc/newhdrgen/yaml/unistd.yaml b/libc/hdrgen/yaml/unistd.yaml similarity index 100% rename from libc/newhdrgen/yaml/unistd.yaml rename to libc/hdrgen/yaml/unistd.yaml diff --git a/libc/newhdrgen/yaml/wchar.yaml b/libc/hdrgen/yaml/wchar.yaml similarity index 100% rename from libc/newhdrgen/yaml/wchar.yaml rename to libc/hdrgen/yaml/wchar.yaml diff --git a/libc/newhdrgen/yaml_functions_sorted.py b/libc/hdrgen/yaml_functions_sorted.py similarity index 100% rename from libc/newhdrgen/yaml_functions_sorted.py rename to libc/hdrgen/yaml_functions_sorted.py diff --git a/libc/newhdrgen/yaml_to_classes.py b/libc/hdrgen/yaml_to_classes.py similarity index 100% rename from libc/newhdrgen/yaml_to_classes.py rename to libc/hdrgen/yaml_to_classes.py diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt index 7fc67141996ec..6fdaa6c03c0c8 100644 --- a/libc/include/CMakeLists.txt +++ b/libc/include/CMakeLists.txt @@ -32,7 +32,7 @@ endmacro() add_header_macro( ctype - ../libc/newhdrgen/yaml/ctype.yaml + ../libc/hdrgen/yaml/ctype.yaml ctype.h.def ctype.h DEPENDS @@ -42,7 +42,7 @@ add_header_macro( add_header_macro( dirent - ../libc/newhdrgen/yaml/dirent.yaml + ../libc/hdrgen/yaml/dirent.yaml dirent.h.def dirent.h DEPENDS @@ -54,7 +54,7 @@ add_header_macro( add_header_macro( fcntl - ../libc/newhdrgen/yaml/fcntl.yaml + ../libc/hdrgen/yaml/fcntl.yaml fcntl.h.def fcntl.h DEPENDS @@ -70,7 +70,7 @@ add_header_macro( add_header_macro( dlfcn - ../libc/newhdrgen/yaml/dlfcn.yaml + ../libc/hdrgen/yaml/dlfcn.yaml dlfcn.h.def dlfcn.h DEPENDS @@ -80,7 +80,7 @@ add_header_macro( add_header_macro( features - ../libc/newhdrgen/yaml/features.yaml + ../libc/hdrgen/yaml/features.yaml features.h.def features.h DEPENDS @@ -90,7 +90,7 @@ add_header_macro( add_header_macro( fenv - ../libc/newhdrgen/yaml/fenv.yaml + ../libc/hdrgen/yaml/fenv.yaml fenv.h.def fenv.h DEPENDS @@ -102,7 +102,7 @@ add_header_macro( add_header_macro( inttypes - ../libc/newhdrgen/yaml/inttypes.yaml + ../libc/hdrgen/yaml/inttypes.yaml inttypes.h.def inttypes.h DEPENDS @@ -113,7 +113,7 @@ add_header_macro( add_header_macro( float - ../libc/newhdrgen/yaml/float.yaml + ../libc/hdrgen/yaml/float.yaml float.h.def float.h DEPENDS @@ -122,7 +122,7 @@ add_header_macro( add_header_macro( stdint - ../libc/newhdrgen/yaml/stdint.yaml + ../libc/hdrgen/yaml/stdint.yaml stdint.h.def stdint.h DEPENDS @@ -131,7 +131,7 @@ add_header_macro( add_header_macro( limits - ../libc/newhdrgen/yaml/limits.yaml + ../libc/hdrgen/yaml/limits.yaml limits.h.def limits.h DEPENDS @@ -140,7 +140,7 @@ add_header_macro( add_header_macro( malloc - ../libc/newhdrgen/yaml/malloc.yaml + ../libc/hdrgen/yaml/malloc.yaml malloc.h.def malloc.h DEPENDS @@ -150,7 +150,7 @@ add_header_macro( add_header_macro( math - ../libc/newhdrgen/yaml/math.yaml + ../libc/hdrgen/yaml/math.yaml math.h.def math.h DEPENDS @@ -165,7 +165,7 @@ add_header_macro( add_header_macro( stdfix - ../libc/newhdrgen/yaml/stdfix.yaml + ../libc/hdrgen/yaml/stdfix.yaml stdfix.h.def stdfix.h DEPENDS @@ -178,7 +178,7 @@ file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/arpa) add_header_macro( arpa_inet - ../libc/newhdrgen/yaml/arpa/inet.yaml + ../libc/hdrgen/yaml/arpa/inet.yaml arpa/inet.h.def arpa/inet.h DEPENDS @@ -187,7 +187,7 @@ add_header_macro( add_header_macro( assert - ../libc/newhdrgen/yaml/assert.yaml + ../libc/hdrgen/yaml/assert.yaml assert.h.def assert.h DEPENDS @@ -197,7 +197,7 @@ add_header_macro( add_header_macro( complex - ../libc/newhdrgen/yaml/complex.yaml + ../libc/hdrgen/yaml/complex.yaml complex.h.def complex.h DEPENDS @@ -207,7 +207,7 @@ add_header_macro( add_header_macro( setjmp - ../libc/newhdrgen/yaml/setjmp.yaml + ../libc/hdrgen/yaml/setjmp.yaml setjmp.h.def setjmp.h DEPENDS @@ -217,7 +217,7 @@ add_header_macro( add_header_macro( string - ../libc/newhdrgen/yaml/string.yaml + ../libc/hdrgen/yaml/string.yaml string.h.def string.h DEPENDS @@ -228,7 +228,7 @@ add_header_macro( add_header_macro( strings - ../libc/newhdrgen/yaml/strings.yaml + ../libc/hdrgen/yaml/strings.yaml strings.h.def strings.h DEPENDS @@ -238,7 +238,7 @@ add_header_macro( add_header_macro( search - ../libc/newhdrgen/yaml/search.yaml + ../libc/hdrgen/yaml/search.yaml search.h.def search.h DEPENDS @@ -252,7 +252,7 @@ add_header_macro( add_header_macro( time - ../libc/newhdrgen/yaml/time.yaml + ../libc/hdrgen/yaml/time.yaml time.h.def time.h DEPENDS @@ -268,7 +268,7 @@ add_header_macro( add_header_macro( threads - ../libc/newhdrgen/yaml/threads.yaml + ../libc/hdrgen/yaml/threads.yaml threads.h.def threads.h DEPENDS @@ -285,7 +285,7 @@ add_header_macro( add_header_macro( errno - ../libc/newhdrgen/yaml/errno.yaml + ../libc/hdrgen/yaml/errno.yaml errno.h.def errno.h DEPENDS @@ -295,7 +295,7 @@ add_header_macro( add_header_macro( signal - ../libc/newhdrgen/yaml/signal.yaml + ../libc/hdrgen/yaml/signal.yaml signal.h.def signal.h DEPENDS @@ -311,7 +311,7 @@ add_header_macro( add_header_macro( stdbit - ../libc/newhdrgen/yaml/stdbit.yaml + ../libc/hdrgen/yaml/stdbit.yaml stdbit.h.def stdbit.h DEPENDS @@ -321,7 +321,7 @@ add_header_macro( add_header_macro( stdckdint - ../libc/newhdrgen/yaml/stdckdint.yaml + ../libc/hdrgen/yaml/stdckdint.yaml stdckdint.h.def stdckdint.h DEPENDS @@ -331,7 +331,7 @@ add_header_macro( add_header_macro( stdio - ../libc/newhdrgen/yaml/stdio.yaml + ../libc/hdrgen/yaml/stdio.yaml stdio.h.def stdio.h DEPENDS @@ -347,7 +347,7 @@ add_header_macro( add_header_macro( stdlib - ../libc/newhdrgen/yaml/stdlib.yaml + ../libc/hdrgen/yaml/stdlib.yaml stdlib.h.def stdlib.h DEPENDS @@ -366,7 +366,7 @@ add_header_macro( add_header_macro( unistd - ../libc/newhdrgen/yaml/unistd.yaml + ../libc/hdrgen/yaml/unistd.yaml unistd.h.def unistd.h DEPENDS @@ -385,7 +385,7 @@ add_header_macro( add_header_macro( pthread - ../libc/newhdrgen/yaml/pthread.yaml + ../libc/hdrgen/yaml/pthread.yaml pthread.h.def pthread.h DEPENDS @@ -408,7 +408,7 @@ add_header_macro( add_header_macro( sched - ../libc/newhdrgen/yaml/sched.yaml + ../libc/hdrgen/yaml/sched.yaml sched.h.def sched.h DEPENDS @@ -425,7 +425,7 @@ add_header_macro( add_header_macro( spawn - ../libc/newhdrgen/yaml/spawn.yaml + ../libc/hdrgen/yaml/spawn.yaml spawn.h.def spawn.h DEPENDS @@ -438,7 +438,7 @@ add_header_macro( add_header_macro( link - ../libc/newhdrgen/yaml/link.yaml + ../libc/hdrgen/yaml/link.yaml link.h.def link.h DEPENDS @@ -448,7 +448,7 @@ add_header_macro( add_header_macro( elf - ../libc/newhdrgen/yaml/elf.yaml + ../libc/hdrgen/yaml/elf.yaml elf.h.def elf.h DEPENDS @@ -462,7 +462,7 @@ file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/sys) add_header_macro( sys_auxv - ../libc/newhdrgen/yaml/sys/auxv.yaml + ../libc/hdrgen/yaml/sys/auxv.yaml sys/auxv.h.def sys/auxv.h DEPENDS @@ -472,7 +472,7 @@ add_header_macro( add_header_macro( sys_epoll - ../libc/newhdrgen/yaml/sys/epoll.yaml + ../libc/hdrgen/yaml/sys/epoll.yaml sys/epoll.h.def sys/epoll.h DEPENDS @@ -485,7 +485,7 @@ add_header_macro( add_header_macro( sys_ioctl - ../libc/newhdrgen/yaml/sys/ioctl.yaml + ../libc/hdrgen/yaml/sys/ioctl.yaml sys/ioctl.h.def sys/ioctl.h DEPENDS @@ -495,7 +495,7 @@ add_header_macro( add_header_macro( sys_mman - ../libc/newhdrgen/yaml/sys/mman.yaml + ../libc/hdrgen/yaml/sys/mman.yaml sys/mman.h.def sys/mman.h DEPENDS @@ -508,7 +508,7 @@ add_header_macro( add_header_macro( sys_prctl - ../libc/newhdrgen/yaml/sys/prctl.yaml + ../libc/hdrgen/yaml/sys/prctl.yaml sys/prctl.h.def sys/prctl.h DEPENDS @@ -525,7 +525,7 @@ add_header( add_header_macro( sys_random - ../libc/newhdrgen/yaml/sys/random.yaml + ../libc/hdrgen/yaml/sys/random.yaml sys/random.h.def sys/random.h DEPENDS @@ -537,7 +537,7 @@ add_header_macro( add_header_macro( sys_resource - ../libc/newhdrgen/yaml/sys/resource.yaml + ../libc/hdrgen/yaml/sys/resource.yaml sys/resource.h.def sys/resource.h DEPENDS @@ -549,7 +549,7 @@ add_header_macro( add_header_macro( sys_stat - ../libc/newhdrgen/yaml/sys/stat.yaml + ../libc/hdrgen/yaml/sys/stat.yaml sys/stat.h.def sys/stat.h DEPENDS @@ -571,7 +571,7 @@ add_header_macro( add_header_macro( sys_select - ../libc/newhdrgen/yaml/sys/select.yaml + ../libc/hdrgen/yaml/sys/select.yaml sys/select.h.def sys/select.h DEPENDS @@ -587,7 +587,7 @@ add_header_macro( add_header_macro( sys_sendfile - ../libc/newhdrgen/yaml/sys/sendfile.yaml + ../libc/hdrgen/yaml/sys/sendfile.yaml sys/sendfile.h.def sys/sendfile.h DEPENDS @@ -599,7 +599,7 @@ add_header_macro( add_header_macro( sys_socket - ../libc/newhdrgen/yaml/sys/socket.yaml + ../libc/hdrgen/yaml/sys/socket.yaml sys/socket.h.def sys/socket.h DEPENDS @@ -615,7 +615,7 @@ add_header_macro( add_header_macro( sys_statvfs - ../libc/newhdrgen/yaml/sys/statvfs.yaml + ../libc/hdrgen/yaml/sys/statvfs.yaml sys/statvfs.h.def sys/statvfs.h DEPENDS @@ -625,7 +625,7 @@ add_header_macro( add_header_macro( sys_syscall - ../libc/newhdrgen/yaml/sys/syscall.yaml + ../libc/hdrgen/yaml/sys/syscall.yaml sys/syscall.h.def sys/syscall.h DEPENDS @@ -633,7 +633,7 @@ add_header_macro( add_header_macro( sys_time - ../libc/newhdrgen/yaml/sys/time.yaml + ../libc/hdrgen/yaml/sys/time.yaml sys/time.h.def sys/time.h DEPENDS @@ -644,7 +644,7 @@ add_header_macro( add_header_macro( sys_types - ../libc/newhdrgen/yaml/sys/types.yaml + ../libc/hdrgen/yaml/sys/types.yaml sys/types.h.def sys/types.h DEPENDS @@ -674,7 +674,7 @@ add_header_macro( add_header_macro( sys_utsname - ../libc/newhdrgen/yaml/sys/utsname.yaml + ../libc/hdrgen/yaml/sys/utsname.yaml sys/utsname.h.def sys/utsname.h DEPENDS @@ -684,7 +684,7 @@ add_header_macro( add_header_macro( sys_wait - ../libc/newhdrgen/yaml/sys/wait.yaml + ../libc/hdrgen/yaml/sys/wait.yaml sys/wait.h.def sys/wait.h DEPENDS @@ -697,7 +697,7 @@ add_header_macro( add_header_macro( termios - ../libc/newhdrgen/yaml/termios.yaml + ../libc/hdrgen/yaml/termios.yaml termios.h.def termios.h DEPENDS @@ -712,7 +712,7 @@ add_header_macro( add_header_macro( uchar - ../libc/newhdrgen/yaml/uchar.yaml + ../libc/hdrgen/yaml/uchar.yaml uchar.h.def uchar.h DEPENDS @@ -725,7 +725,7 @@ add_header_macro( add_header_macro( wchar - ../libc/newhdrgen/yaml/wchar.yaml + ../libc/hdrgen/yaml/wchar.yaml wchar.h.def wchar.h DEPENDS @@ -739,7 +739,7 @@ add_header_macro( add_header_macro( locale - ../libc/newhdrgen/yaml/locale.yaml + ../libc/hdrgen/yaml/locale.yaml locale.h.def locale.h DEPENDS @@ -754,7 +754,7 @@ if(LIBC_TARGET_OS_IS_GPU) add_header_macro( gpu_rpc - ../libc/newhdrgen/yaml/gpu/rpc.yaml + ../libc/hdrgen/yaml/gpu/rpc.yaml gpu/rpc.h.def gpu/rpc.h DEPENDS diff --git a/libc/newhdrgen/CMakeLists.txt b/libc/newhdrgen/CMakeLists.txt deleted file mode 100644 index 523f8c2609124..0000000000000 --- a/libc/newhdrgen/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -if(LLVM_LIBC_FULL_BUILD) - enable_testing() - - set(NEWHDGEN_TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests) - set(TEST_OUTPUT_DIR ${CMAKE_BINARY_DIR}/newhdrgen/output) - - add_test( - NAME newhdrgen_integration_test - COMMAND python3 ${NEWHDGEN_TESTS_DIR}/test_integration.py --output_dir ${TEST_OUTPUT_DIR} - ) - - add_custom_target(check-newhdrgen - COMMAND ${CMAKE_CTEST_COMMAND} -R newhdrgen_integration_test --output-on-failure - ) - - message(STATUS "Integration test for newhdrgen added.") -endif() diff --git a/libc/src/math/docs/add_math_function.md b/libc/src/math/docs/add_math_function.md index e9a6aadc6c44f..f02d502399e2b 100644 --- a/libc/src/math/docs/add_math_function.md +++ b/libc/src/math/docs/add_math_function.md @@ -18,7 +18,7 @@ together with its specifications: ``` - Add function specs to the file: ``` - libc/newhdrgen/yaml/math.yaml + libc/hdrgen/yaml/math.yaml ``` ## Implementation