aboutsummaryrefslogtreecommitdiff
path: root/CommonConfig.cmake
diff options
context:
space:
mode:
authorTamas Ban <tamas.ban@arm.com>2019-08-27 10:43:03 +0100
committerTamas Ban <tamas.ban@arm.com>2019-09-23 11:24:57 +0000
commit303dd0834ab31f495b7054d3abab9d6b0b972edd (patch)
treefe0685b7c53cb50b5c56c30214e19430bf017d6b /CommonConfig.cmake
parent01f64c54f4ebbfb621f32a370edc8af138cd8b5a (diff)
downloadtrusted-firmware-m-303dd0834ab31f495b7054d3abab9d6b0b972edd.tar.gz
Attest: Remove test code from release build
Due to code size optimization reasons the test code is removed from the TF-M release build. Some attestation test cases (short-circuit signature, get minimal token, passing option fields to attestation service) only available in debug builds. Change-Id: I17f44604bbd30b1d9098a7f6d13a1ca21d5c80ae Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Diffstat (limited to 'CommonConfig.cmake')
-rw-r--r--CommonConfig.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 15635e1e4f..eff3005367 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -343,6 +343,12 @@ if (NOT DEFINED ATTEST_INCLUDE_OPTIONAL_CLAIMS)
set(ATTEST_INCLUDE_OPTIONAL_CLAIMS ON)
endif()
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(ATTEST_INCLUDE_TEST_CODE_AND_KEY_ID ON)
+else()
+ set(ATTEST_INCLUDE_TEST_CODE_AND_KEY_ID OFF)
+endif()
+
##Set mbedTLS compiler flags for BL2 bootloader
set(MBEDTLS_C_FLAGS_BL2 "-D__ARM_FEATURE_CMSE=${ARM_FEATURE_CMSE} -D__thumb2__ ${COMMON_COMPILE_FLAGS_STR} -DMBEDTLS_CONFIG_FILE=\\\\\\\"config-boot.h\\\\\\\" -I${CMAKE_CURRENT_LIST_DIR}/bl2/ext/mcuboot/include")
if (MCUBOOT_SIGNATURE_TYPE STREQUAL "RSA-3072")