Skip to content

Commit

Permalink
arch/sim/src/cmake/Toolchain.cmake: macOS fix unknown options: --gc-s…
Browse files Browse the repository at this point in the history
…ections

fix
ld: unknown options: --gc-sections

added -> add_link_options(-Wl,-dead_strip)
  • Loading branch information
simbit18 authored and acassis committed Aug 12, 2024
1 parent f5b2fc3 commit 155517b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/sim/src/cmake/Toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 155517b

Please sign in to comment.