Skip to content

Commit ab0e6fc

Browse files
vonosmasAlexey Samsonov
andauthored
[libc][cmake] Clean up dead code in add_gen_header (llvm#128753)
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. Co-authored-by: Alexey Samsonov <samsonov@google.com>
1 parent f567524 commit ab0e6fc

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

libc/cmake/modules/LLVMLibCHeaderRules.cmake

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ function(add_gen_header target_name)
9898
set(dep_file "${out_file}.d")
9999
set(yaml_file ${CMAKE_SOURCE_DIR}/${ADD_GEN_HDR_YAML_FILE})
100100

101-
set(fq_data_files "")
102-
if(ADD_GEN_HDR_DATA_FILES)
103-
foreach(data_file IN LISTS ADD_GEN_HDR_DATA_FILES)
104-
list(APPEND fq_data_files "${CMAKE_CURRENT_SOURCE_DIR}/${data_file}")
105-
endforeach(data_file)
106-
endif()
107-
108101
set(entry_points "${TARGET_ENTRYPOINT_NAME_LIST}")
109102
list(TRANSFORM entry_points PREPEND "--entry-point=")
110103

@@ -117,7 +110,7 @@ function(add_gen_header target_name)
117110
--write-if-changed
118111
${entry_points}
119112
${yaml_file}
120-
DEPENDS ${yaml_file} ${fq_data_files}
113+
DEPENDS ${yaml_file}
121114
DEPFILE ${dep_file}
122115
COMMENT "Generating header ${ADD_GEN_HDR_GEN_HDR} from ${yaml_file}"
123116
)
@@ -133,7 +126,7 @@ function(add_gen_header target_name)
133126
${entry_points}
134127
--output_dir ${decl_out_file}
135128
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
136-
DEPENDS ${yaml_file} ${fq_data_files}
129+
DEPENDS ${yaml_file}
137130
)
138131
endif()
139132

0 commit comments

Comments
 (0)