From 072e77ab4017af54b328a8843d145128efc2e74f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 2 Apr 2025 11:37:22 +0200 Subject: [PATCH] mbedtls: Disable ASM when compiling with LLVM MemorySanitizer (MSAN) --- thirdparty/mbedtls/include/godot_module_mbedtls_config.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/thirdparty/mbedtls/include/godot_module_mbedtls_config.h b/thirdparty/mbedtls/include/godot_module_mbedtls_config.h index 58bf1d9d54..0228e0fc0a 100644 --- a/thirdparty/mbedtls/include/godot_module_mbedtls_config.h +++ b/thirdparty/mbedtls/include/godot_module_mbedtls_config.h @@ -56,6 +56,14 @@ #undef MBEDTLS_AESCE_C #endif +#if defined(__has_feature) +#if __has_feature(memory_sanitizer) +// MemorySanitizer is incompatible with ASM. +#undef MBEDTLS_HAVE_ASM +#undef MBEDTLS_AESNI_C +#endif +#endif + // Disable deprecated #define MBEDTLS_DEPRECATED_REMOVED