mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(cmakev2/build): rename LINKER_SCRIPTS_STATIC to LINKER_SCRIPTS
Rename the LINKER_SCRIPTS_STATIC component property to LINKER_SCRIPTS.
This property stores linker scripts that are not processed by ldgen,
which essentially includes all of them. The only linker script processed
by ldgen is sections.ld, which is handled by the esp_system component.
This implies that there is likely no practical use case for other
components to utilize ldgen processed linker scripts. This change is
purely cosmetic to allow components to add linker scripts with:
idf_component_set_property(${COMPONENT_TARGET} LINKER_SCRIPTS linker_script.ld APPEND)
instead of
idf_component_set_property(${COMPONENT_TARGET} LINKER_SCRIPTS_STATIC linker_script.ld APPEND)
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -388,12 +388,14 @@ function(idf_build_library library)
|
||||
|
||||
foreach(component_interface IN LISTS component_interfaces_linked)
|
||||
set(scripts)
|
||||
idf_component_get_property(component_dir "${component_interface}" COMPONENT_DIR)
|
||||
idf_component_get_property(component_build_dir "${component_interface}" COMPONENT_BUILD_DIR)
|
||||
idf_component_get_property(preprocessed "${component_interface}" __LINKER_SCRIPTS_PREPROCESSED)
|
||||
|
||||
# Add linker scripts that do not require ldgen processing.
|
||||
idf_component_get_property(scripts_static "${component_interface}" LINKER_SCRIPTS_STATIC)
|
||||
foreach(script IN LISTS scripts_static)
|
||||
idf_component_get_property(scripts_static "${component_interface}" LINKER_SCRIPTS)
|
||||
__get_absolute_paths(PATHS "${scripts_static}" BASE_DIR "${component_dir}" OUTPUT scripts_static_abs)
|
||||
foreach(script IN LISTS scripts_static_abs)
|
||||
if(script MATCHES "\\.in$")
|
||||
# If the linker script file name ends with the ".in" extension,
|
||||
# preprocess it with the C preprocessor.
|
||||
|
||||
@@ -190,7 +190,7 @@ function(target_linker_script target deptype scriptfiles)
|
||||
idf_component_set_property("${target}" LINKER_SCRIPTS_TEMPLATE "${scriptfile}" APPEND)
|
||||
idf_component_set_property("${target}" LINKER_SCRIPTS_GENERATED "${output}" APPEND)
|
||||
else()
|
||||
idf_component_set_property("${target}" LINKER_SCRIPTS_STATIC ${scriptfile} APPEND)
|
||||
idf_component_set_property("${target}" LINKER_SCRIPTS ${scriptfile} APPEND)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user