Add -fno-rtti to ensure no RTTI is generated
As for the MK3, we should never depend on RTTI in the FWpull/96/head
parent
fc2fce1230
commit
448edfd84b
|
|
@ -100,7 +100,7 @@ if(CMAKE_CROSSCOMPILING)
|
||||||
add_link_options(-Wl,--gc-sections)
|
add_link_options(-Wl,--gc-sections)
|
||||||
|
|
||||||
# disable exceptions and related metadata
|
# disable exceptions and related metadata
|
||||||
add_compile_options(-fno-exceptions -fno-unwind-tables)
|
add_compile_options(-fno-exceptions -fno-unwind-tables -fno-rtti)
|
||||||
add_link_options(-Wl,--defsym,__exidx_start=0,--defsym,__exidx_end=0)
|
add_link_options(-Wl,--defsym,__exidx_start=0,--defsym,__exidx_end=0)
|
||||||
else()
|
else()
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
|
@ -143,16 +143,12 @@ if(CMAKE_CROSSCOMPILING)
|
||||||
|
|
||||||
# produce ASM listing
|
# produce ASM listing
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET firmware
|
TARGET firmware POST_BUILD COMMAND ${CMAKE_OBJDUMP} -CSd firmware > firmware.asm
|
||||||
POST_BUILD
|
|
||||||
COMMAND ${CMAKE_OBJDUMP} -CSd firmware > firmware.asm
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# inform about the firmware's size in terminal
|
# inform about the firmware's size in terminal
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET firmware
|
TARGET firmware POST_BUILD COMMAND ${CMAKE_SIZE_UTIL} -C --mcu=atmega32u4 firmware
|
||||||
POST_BUILD
|
|
||||||
COMMAND ${CMAKE_SIZE_UTIL} -C --mcu=atmega32u4 firmware
|
|
||||||
)
|
)
|
||||||
report_size(firmware)
|
report_size(firmware)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue