From 7e5722972cfe99bad076b889ccf42f35d737d62b Mon Sep 17 00:00:00 2001 From: Iraj Date: Mon, 23 Sep 2024 16:13:50 +0200 Subject: [PATCH] Linking C static libs for mbedtls_printf --- mbedtls-platform-support/build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mbedtls-platform-support/build.rs b/mbedtls-platform-support/build.rs index 910e8acab..9e0431066 100644 --- a/mbedtls-platform-support/build.rs +++ b/mbedtls-platform-support/build.rs @@ -34,4 +34,8 @@ fn main() { .flag("-ffreestanding"); } b.compile("librust-mbedtls-platform-support.a"); + // Force correct link order for mbedtls_printf + println!("cargo:rustc-link-lib=static=mbedtls"); + println!("cargo:rustc-link-lib=static=mbedx509"); + println!("cargo:rustc-link-lib=static=mbedcrypto"); }