kopia lustrzana https://github.com/espressif/esp-idf
esp_common: append gc sections link flag
rodzic
d214bb912f
commit
c564d1730f
|
@ -4,6 +4,7 @@ if(BOOTLOADER_BUILD)
|
||||||
set(COMPONENT_REQUIRES ${IDF_COMPONENTS})
|
set(COMPONENT_REQUIRES ${IDF_COMPONENTS})
|
||||||
set(COMPONENT_SRCS )
|
set(COMPONENT_SRCS )
|
||||||
register_component()
|
register_component()
|
||||||
|
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections")
|
||||||
else()
|
else()
|
||||||
# Regular app build
|
# Regular app build
|
||||||
set(COMPONENT_SRCS
|
set(COMPONENT_SRCS
|
||||||
|
@ -26,4 +27,6 @@ else()
|
||||||
"src/stack_check.c"
|
"src/stack_check.c"
|
||||||
PROPERTIES COMPILE_FLAGS
|
PROPERTIES COMPILE_FLAGS
|
||||||
-fno-stack-protector)
|
-fno-stack-protector)
|
||||||
|
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_LIBRARIES "-Wl,--gc-sections")
|
||||||
|
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -352,7 +352,6 @@ macro(project project_name)
|
||||||
add_executable(${project_elf} "${project_elf_src}")
|
add_executable(${project_elf} "${project_elf_src}")
|
||||||
add_dependencies(${project_elf} _project_elf_src)
|
add_dependencies(${project_elf} _project_elf_src)
|
||||||
|
|
||||||
target_link_libraries(${project_elf} "-Wl,--gc-sections")
|
|
||||||
target_link_libraries(${project_elf} "-Wl,--start-group")
|
target_link_libraries(${project_elf} "-Wl,--start-group")
|
||||||
|
|
||||||
if(test_components)
|
if(test_components)
|
||||||
|
|
Ładowanie…
Reference in New Issue