Skip to content

Commit 45cf9e9

Browse files
committed
mbedtls: fix mbed-psa link missing
mbed-psa provides one mbed psa implementation which mbedtls needs to link. For example, mbedtls_hardware_poll (mbedtls mbed_trng.cpp) invokes trng_init and friends which are implemented in mbed-psa psa_hrng.c.
1 parent df28d42 commit 45cf9e9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

connectivity/mbedtls/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,12 @@ target_compile_definitions(mbed-mbedtls
115115
MBED_CONF_MBEDTLS_PRESENT=1
116116
)
117117

118-
target_link_libraries(mbed-mbedtls PUBLIC mbed-core-flags)
118+
target_link_libraries(mbed-mbedtls
119+
PUBLIC
120+
mbed-core-flags
121+
INTERFACE
122+
$<$<IN_LIST:PSA_Target,${MBED_TARGET_LABELS}>:mbed-psa>
123+
)
119124

120125
# Workaround for https://github.com/ARMmbed/mbedtls/issues/1077
121126
# which affects cores without __thumb2__ set by the compiler

0 commit comments

Comments
 (0)