arch/sim/src/cmake/Toolchain.cmake: macOS fix unknown options: --gc-sections

fix
ld: unknown options: --gc-sections

added -> add_link_options(-Wl,-dead_strip)
This commit is contained in:
simbit18 2024-08-12 13:39:50 +02:00 committed by Alan Carvalho de Assis
parent f5b2fc371e
commit 155517b5fc

View File

@ -97,7 +97,11 @@ else()
endif()
if(CONFIG_DEBUG_OPT_UNUSED_SECTIONS)
add_link_options(-Wl,--gc-sections)
if(APPLE)
add_link_options(-Wl,-dead_strip)
else()
add_link_options(-Wl,--gc-sections)
endif()
add_compile_options(-ffunction-sections -fdata-sections)
endif()