cmake: use -warn_commons instead of --warn-common on macOS

This commit is contained in:
Ivan Grokhotkov 2022-04-10 19:54:56 +02:00
parent 3602d332c4
commit 34aa82a11a
No known key found for this signature in database
GPG Key ID: 1E050E141B280628

View File

@ -198,12 +198,13 @@ if(CONFIG_ESP_SYSTEM_USE_EH_FRAME)
endif()
list(APPEND link_options "-fno-lto")
list(APPEND link_options "-Wl,--warn-common")
if(CONFIG_IDF_TARGET_LINUX AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
list(APPEND link_options "-Wl,-dead_strip")
list(APPEND link_options "-Wl,-warn_commons")
else()
list(APPEND link_options "-Wl,--gc-sections")
list(APPEND link_options "-Wl,--warn-common")
endif()
# SMP FreeRTOS user provided minimal idle hook. This allows the user to provide