mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
cmake: generate sections info for all static libs as in make
This commit is contained in:
parent
a9c784339d
commit
4c83f456ab
@ -62,6 +62,8 @@ function(register_component)
|
|||||||
set(include_type PUBLIC)
|
set(include_type PUBLIC)
|
||||||
|
|
||||||
set_property(TARGET ${COMPONENT_TARGET} PROPERTY OUTPUT_NAME ${COMPONENT_NAME})
|
set_property(TARGET ${COMPONENT_TARGET} PROPERTY OUTPUT_NAME ${COMPONENT_NAME})
|
||||||
|
|
||||||
|
ldgen_generate_sections_info(${COMPONENT_TARGET})
|
||||||
else()
|
else()
|
||||||
add_library(${COMPONENT_TARGET} INTERFACE) # header-only component
|
add_library(${COMPONENT_TARGET} INTERFACE) # header-only component
|
||||||
set(include_type INTERFACE)
|
set(include_type INTERFACE)
|
||||||
|
@ -22,7 +22,12 @@ function(ldgen_add_fragment_files target fragment_files)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set_property(TARGET ldgen APPEND PROPERTY FRAGMENT_FILES ${fragment_files_full_path})
|
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)
|
get_filename_component(target_sections_info ${CMAKE_CURRENT_BINARY_DIR}/${target}.sections_info ABSOLUTE)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user