Skip to content

Conversation

@vonosmas
Copy link
Contributor

DATA_FILES CMake argument never existed in the new YAML-based hdrgen version of add_gen_header function, and thus its uses added in b1fd6f0 were always dead code.

Remove them to clean up the function implementation.

DATA_FILES CMake argument never existed in the new YAML-based
hdrgen version of add_gen_header function, and thus its uses
added in b1fd6f0 were always
dead code.

Remove them to clean up the function implementation.
@vonosmas vonosmas requested a review from lntue February 25, 2025 18:18
@llvmbot llvmbot added the libc label Feb 25, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 25, 2025

@llvm/pr-subscribers-libc

Author: Alexey Samsonov (vonosmas)

Changes

DATA_FILES CMake argument never existed in the new YAML-based hdrgen version of add_gen_header function, and thus its uses added in b1fd6f0 were always dead code.

Remove them to clean up the function implementation.


Full diff: https://github.com/llvm/llvm-project/pull/128753.diff

1 Files Affected:

  • (modified) libc/cmake/modules/LLVMLibCHeaderRules.cmake (+2-9)
diff --git a/libc/cmake/modules/LLVMLibCHeaderRules.cmake b/libc/cmake/modules/LLVMLibCHeaderRules.cmake
index ea8b76e0f6235..99f90244e0134 100644
--- a/libc/cmake/modules/LLVMLibCHeaderRules.cmake
+++ b/libc/cmake/modules/LLVMLibCHeaderRules.cmake
@@ -98,13 +98,6 @@ function(add_gen_header target_name)
   set(dep_file "${out_file}.d")
   set(yaml_file ${CMAKE_SOURCE_DIR}/${ADD_GEN_HDR_YAML_FILE})
 
-  set(fq_data_files "")
-  if(ADD_GEN_HDR_DATA_FILES)
-    foreach(data_file IN LISTS ADD_GEN_HDR_DATA_FILES)
-      list(APPEND fq_data_files "${CMAKE_CURRENT_SOURCE_DIR}/${data_file}")
-    endforeach(data_file)
-  endif()
-
   set(entry_points "${TARGET_ENTRYPOINT_NAME_LIST}")
   list(TRANSFORM entry_points PREPEND "--entry-point=")
 
@@ -117,7 +110,7 @@ function(add_gen_header target_name)
             --write-if-changed
             ${entry_points}
             ${yaml_file}
-    DEPENDS ${yaml_file} ${fq_data_files}
+    DEPENDS ${yaml_file}
     DEPFILE ${dep_file}
     COMMENT "Generating header ${ADD_GEN_HDR_GEN_HDR} from ${yaml_file}"
   )
@@ -133,7 +126,7 @@ function(add_gen_header target_name)
               ${entry_points}
               --output_dir ${decl_out_file}
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-      DEPENDS ${yaml_file} ${fq_data_files}
+      DEPENDS ${yaml_file}
     )
   endif()
 

@vonosmas vonosmas merged commit ab0e6fc into llvm:main Feb 25, 2025
16 of 17 checks passed
@vonosmas vonosmas deleted the hdrgen-cleanup branch February 25, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants