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:
parent
f5b2fc371e
commit
155517b5fc
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user