Skip to content

Commit f092054

Browse files
committed
Merge branch 'feature/hidden_link_as_a_group' into 'master'
cmake: add hidden option to link components as group See merge request espressif/esp-idf!9617
2 parents 6798ab3 + 7b9ab1e commit f092054

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/cmake/project.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,10 @@ macro(project project_name)
440440
add_executable(${project_elf} "${project_elf_src}")
441441
add_dependencies(${project_elf} _project_elf_src)
442442

443+
if(__PROJECT_GROUP_LINK_COMPONENTS)
444+
target_link_libraries(${project_elf} "-Wl,--start-group")
445+
endif()
446+
443447
if(test_components)
444448
target_link_libraries(${project_elf} "-Wl,--whole-archive")
445449
foreach(test_component ${test_components})

0 commit comments

Comments
 (0)