[libc] Use entrypoints.txt as the single source of list of functions for a platform.
[lldb.git] / libc / cmake / modules / LLVMLibCHeaderRules.cmake
index 072203c..c01cf25 100644 (file)
@@ -84,11 +84,15 @@ function(add_gen_header target_name)
 
   file(GLOB td_includes ${LIBC_SOURCE_DIR}/spec/*.td)
 
+  set(ENTRYPOINT_NAME_LIST_ARG ${TARGET_ENTRYPOINT_NAME_LIST})
+  list(TRANSFORM ENTRYPOINT_NAME_LIST_ARG PREPEND "--e=")
+
   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
+           ${ENTRYPOINT_NAME_LIST_ARG}
+           ${LIBC_SOURCE_DIR}/config/${LIBC_TARGET_OS}/api.td
 
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     DEPENDS ${in_file} ${fq_data_files} ${td_includes}