mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(cmakev2): add --cref with MAPFILE_TARGET and remove global -Wl,--cref
When MAPFILE_TARGET is used in idf_build_executable, add the linker --cref option so the cross-reference table is written to the map file instead of stdout. Remove the global -Wl,--cref from default link options in project.cmake so cref is only applied where a map file is requested.
This commit is contained in:
committed by
Frantisek Hrbata
parent
fb38cbc990
commit
c4fcce84cc
@@ -419,8 +419,6 @@ function(__init_project_configuration)
|
||||
if("${linker_type}" STREQUAL "GNU")
|
||||
set(target_upper "${idf_target}")
|
||||
string(TOUPPER ${target_upper} target_upper)
|
||||
# Add cross-reference table to the map file
|
||||
list(APPEND link_options "-Wl,--cref")
|
||||
# Add this symbol as a hint for esp_idf_size to guess the target name
|
||||
list(APPEND link_options "-Wl,--defsym=IDF_TARGET_${target_upper}=0")
|
||||
# Check if linker supports --no-warn-rwx-segments
|
||||
|
||||
Reference in New Issue
Block a user