Build: Compile Mbed TLS as MinSizeRel by default
Changes the build system to compile Mbed TLS without debug symbols by
default. It can still be built with debug symbols by adding
-DMBEDTLS_DEBUG=ON to the CMake command. Most of the time TF-M
developers do not need to debug Mbed TLS, and building it as
"MinSizeRel" by default allows for smaller, faster binaries. It also
eliminates the need for Musca-specific build settings to shrink the
binary size.
Change-Id: I4b691a50f63ddbb4707a196bf7950f8e7603a32c
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index d5f4ab1..964a51c 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -230,14 +230,7 @@
endif()
if (NOT DEFINED MBEDTLS_DEBUG)
- if (${COMPILER} STREQUAL "GNUARM" AND ${TARGET_PLATFORM} MATCHES "MUSCA_A|MUSCA_B1" AND BL2)
- #The size of the MCUboot binary compiled with GCC exceeds the size limit on
- #Musca-A/B1. By turning off the mbed TLS debug build is a good way to go below
- #that limit, while it is still possible to debug TFM/bootloader code.
- set (MBEDTLS_DEBUG OFF)
- else ()
- set (MBEDTLS_DEBUG ON)
- endif ()
+ set(MBEDTLS_DEBUG OFF)
endif()
##Set mbedTLS compiler flags for BL2 bootloader