build Samples/Dialog as single-segment app (to prevent the code path from rotting)

This commit is contained in:
Wolfgang Thaller 2017-09-30 23:38:23 +02:00
parent 32a2da9547
commit c10538e350

View File

@ -27,3 +27,11 @@ add_application(Dialog
dialog.c
dialog.r
)
# Enable -ffunction-sections and -gc-sections to make the app as small as possible
# also enable --mac-single to build it as a single-segment app (so that this code path doesn't rot)
set_target_properties(Dialog
PROPERTIES
COMPILE_OPTIONS -ffunction-sections
LINK_FLAGS "-Wl,-gc-sections -Wl,--mac-single"
)