Skip to content

Commit

Permalink
mbedtls: fix mbed-psa link missing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ccli8 committed Dec 5, 2024
1 parent df28d42 commit 45cf9e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion connectivity/mbedtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ target_compile_definitions(mbed-mbedtls
MBED_CONF_MBEDTLS_PRESENT=1
)

target_link_libraries(mbed-mbedtls PUBLIC mbed-core-flags)
target_link_libraries(mbed-mbedtls
PUBLIC
mbed-core-flags
INTERFACE
$<$<IN_LIST:PSA_Target,${MBED_TARGET_LABELS}>:mbed-psa>
)

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

0 comments on commit 45cf9e9

Please sign in to comment.