Skip to content

Commit 9358be8

Browse files
authored
Set newlib optimization level to -Os (#395)
After -O2 optimization was removed in #349 it was reported that memory usage increased a lot #352 The proposed solution is to use -Os which is based on -O2, but takes care of code size that is important in embedded applications.
1 parent 94668eb commit 9358be8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arm-software/embedded/arm-runtimes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ if(C_LIBRARY MATCHES "^newlib")
523523
--enable-newlib-global-atexit)
524524
endif()
525525
else()
526+
set(newlib_optim_flags "-Os")
526527
set(newlib_flags
527528
--enable-newlib-io-long-long
528529
--enable-newlib-register-fini

0 commit comments

Comments
 (0)