mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
cmake: only allow gold linker for posix builds
- the gold linker doesn't currently work for NuttX builds - NuttX skip --print-memory-usage if using the GOLD linker - fixes #15400
This commit is contained in:
@@ -124,7 +124,6 @@ target_link_libraries(px4 PRIVATE
|
||||
-Wl,-Map=${PX4_CONFIG}.map
|
||||
-Wl,--warn-common
|
||||
-Wl,--gc-sections
|
||||
-Wl,--print-memory-usage
|
||||
|
||||
-Wl,--start-group
|
||||
${nuttx_libs}
|
||||
@@ -134,6 +133,10 @@ target_link_libraries(px4 PRIVATE
|
||||
gcc
|
||||
)
|
||||
|
||||
if(NOT USE_LD_GOLD)
|
||||
target_link_libraries(px4 PRIVATE -Wl,--print-memory-usage)
|
||||
endif()
|
||||
|
||||
target_link_libraries(px4 PRIVATE ${module_libraries})
|
||||
|
||||
if (config_romfs_root)
|
||||
|
||||
Reference in New Issue
Block a user