[libc-commits] [libc] d9e96b6 - [libc] Add spec/*.td as dependencies to add_gen_header

Alex Brachet via libc-commits libc-commits at lists.llvm.org
Fri Apr 17 10:11:06 PDT 2020


Author: Alex Brachet
Date: 2020-04-17T13:10:46-04:00
New Revision: d9e96b6a026777d299e12d3a50d00c2308d4dcdf

URL: https://github.com/llvm/llvm-project/commit/d9e96b6a026777d299e12d3a50d00c2308d4dcdf
DIFF: https://github.com/llvm/llvm-project/commit/d9e96b6a026777d299e12d3a50d00c2308d4dcdf.diff

LOG: [libc] Add spec/*.td as dependencies to add_gen_header

Summary: It also re formats long lines in `add_gen_header`

Reviewers: sivachandra

Reviewed By: sivachandra

Subscribers: mgorny, tschuett, libc-commits

Differential Revision: https://reviews.llvm.org/D78349

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCRules.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCRules.cmake b/libc/cmake/modules/LLVMLibCRules.cmake
index 74e534395fd5..f2cabee3210d 100644
--- a/libc/cmake/modules/LLVMLibCRules.cmake
+++ b/libc/cmake/modules/LLVMLibCRules.cmake
@@ -84,11 +84,17 @@ function(add_gen_header target_name)
 
   set(gen_hdr_script "${LIBC_BUILD_SCRIPTS_DIR}/gen_hdr.py")
 
+  file(GLOB td_includes ${LIBC_SOURCE_DIR}/spec/*.td)
+
   add_custom_command(
     OUTPUT ${out_file}
-    COMMAND $<TARGET_FILE:libc-hdrgen> -o ${out_file} --header ${ADD_GEN_HDR_GEN_HDR} --def ${in_file} ${replacement_params} -I ${LIBC_SOURCE_DIR} ${LIBC_SOURCE_DIR}/config/${LIBC_TARGET_OS}/api.td
+    COMMAND $<TARGET_FILE:libc-hdrgen> -o ${out_file} --header ${ADD_GEN_HDR_GEN_HDR}
+            --def ${in_file} ${replacement_params} -I ${LIBC_SOURCE_DIR}
+            ${LIBC_SOURCE_DIR}/config/${LIBC_TARGET_OS}/api.td
+
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    DEPENDS ${in_file} ${fq_data_files} ${LIBC_SOURCE_DIR}/config/${LIBC_TARGET_OS}/api.td libc-hdrgen
+    DEPENDS ${in_file} ${fq_data_files} ${td_includes} 
+            ${LIBC_SOURCE_DIR}/config/${LIBC_TARGET_OS}/api.td libc-hdrgen
   )
 
   get_fq_target_name(${target_name} fq_target_name)


        


More information about the libc-commits mailing list