mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
cmake: generate sections info for all static libs as in make
This commit is contained in:
@@ -62,6 +62,8 @@ function(register_component)
|
||||
set(include_type PUBLIC)
|
||||
|
||||
set_property(TARGET ${COMPONENT_TARGET} PROPERTY OUTPUT_NAME ${COMPONENT_NAME})
|
||||
|
||||
ldgen_generate_sections_info(${COMPONENT_TARGET})
|
||||
else()
|
||||
add_library(${COMPONENT_TARGET} INTERFACE) # header-only component
|
||||
set(include_type INTERFACE)
|
||||
|
@@ -22,7 +22,12 @@ function(ldgen_add_fragment_files target fragment_files)
|
||||
endforeach()
|
||||
|
||||
set_property(TARGET ldgen APPEND PROPERTY FRAGMENT_FILES ${fragment_files_full_path})
|
||||
endfunction()
|
||||
|
||||
# ldgen_generate_sections_info
|
||||
#
|
||||
# Generate sections info for specified target to be used in linker script generation
|
||||
function(ldgen_generate_sections_info target)
|
||||
get_filename_component(target_sections_info ${CMAKE_CURRENT_BINARY_DIR}/${target}.sections_info ABSOLUTE)
|
||||
|
||||
add_custom_command(
|
||||
|
Reference in New Issue
Block a user