build: add option to delete intermediate files
Add option to remove intermediate files to save space and remove clutter. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
e6dfae0fea
commit
fdbf2dbd2b
|
@ -1153,6 +1153,17 @@ if(CONFIG_BUILD_OUTPUT_BIN)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Cleanup intermediate files
|
||||
if(CONFIG_CLEANUP_INTERMEDIATE_FILES)
|
||||
list(APPEND
|
||||
post_build_commands
|
||||
COMMAND
|
||||
# This file can be very large in some cases, delete it as we do not need it.
|
||||
${CMAKE_COMMAND} -E remove ${ZEPHYR_PREBUILT_EXECUTABLE}.elf
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BUILD_OUTPUT_S19)
|
||||
get_property(elfconvert_formats TARGET bintools PROPERTY elfconvert_formats)
|
||||
if(srec IN_LIST elfconvert_formats)
|
||||
|
|
|
@ -295,6 +295,12 @@ config OUTPUT_PRINT_MEMORY_USAGE
|
|||
ram_report and
|
||||
https://sourceware.org/binutils/docs/ld/MEMORY.html
|
||||
|
||||
config CLEANUP_INTERMEDIATE_FILES
|
||||
bool "Remove all intermediate files"
|
||||
help
|
||||
Delete intermediate files to save space and cleanup clutter resulting
|
||||
from the build process.
|
||||
|
||||
config BUILD_NO_GAP_FILL
|
||||
bool "Don't fill gaps in generated hex/bin/s19 files."
|
||||
|
||||
|
|
Loading…
Reference in a new issue