mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
cmake add bloaty helpers for nuttx and use in Jenkins
This commit is contained in:
@@ -103,6 +103,8 @@ target_link_libraries(${FW_NAME} PRIVATE
|
||||
-Wl,--start-group
|
||||
${nuttx_libs}
|
||||
-Wl,--end-group
|
||||
|
||||
m
|
||||
)
|
||||
|
||||
target_link_libraries(${FW_NAME} PRIVATE ${module_libraries})
|
||||
@@ -219,6 +221,47 @@ add_custom_target(stack_check
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
find_program(BLOATY_PROGRAM bloaty)
|
||||
if (BLOATY_PROGRAM)
|
||||
# bloaty symbols
|
||||
add_custom_target(bloaty_symbols
|
||||
COMMAND ${BLOATY_PROGRAM} -d symbols -C full -n 50 -s vm $<TARGET_FILE:${FW_NAME}>
|
||||
DEPENDS ${FW_NAME}
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
# bloaty compilation units
|
||||
add_custom_target(bloaty_compileunits
|
||||
COMMAND ${BLOATY_PROGRAM} -d compileunits -C full -n 50 -s vm $<TARGET_FILE:${FW_NAME}>
|
||||
DEPENDS ${FW_NAME}
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
# bloaty templates
|
||||
add_custom_target(bloaty_templates
|
||||
COMMAND ${BLOATY_PROGRAM} -d shortsymbols,fullsymbols -n 50 $<TARGET_FILE:${FW_NAME}>
|
||||
DEPENDS ${FW_NAME}
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
# bloaty inlines
|
||||
add_custom_target(bloaty_inlines
|
||||
COMMAND ${BLOATY_PROGRAM} -d inlines -C full -n 50 $<TARGET_FILE:${FW_NAME}>
|
||||
DEPENDS ${FW_NAME}
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
# bloaty compare with last master build
|
||||
add_custom_target(bloaty_compare_master
|
||||
COMMAND wget --no-verbose https://s3.amazonaws.com/px4-travis/Firmware/master/${FW_NAME} -O master_${FW_NAME}
|
||||
COMMAND ${BLOATY_PROGRAM} -d symbols -n 50 -C full -s vm $<TARGET_FILE:${FW_NAME}> -- master_${FW_NAME}
|
||||
DEPENDS ${FW_NAME}
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR}
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
)
|
||||
endif()
|
||||
|
||||
# debugger helpers
|
||||
configure_file(gdbinit.in .gdbinit)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user