Skip to content

Commit

Permalink
Disable AESNI for x86 target
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Dec 8, 2024
1 parent deffb40 commit 28552b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ else()
MbedTLS::mbedcrypto MbedTLS::mbedx509)
endif()

target_compile_definitions(LIB_LIEF PRIVATE
-DMBEDTLS_CONFIG_FILE="${CMAKE_CURRENT_SOURCE_DIR}/config/mbedtls/config.h"
)

if(WIN32 AND BUILD_SHARED_LIBS)
target_link_libraries(LIB_LIEF PRIVATE ws2_32)
endif()
Expand Down
5 changes: 5 additions & 0 deletions config/mbedtls/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "mbedtls/mbedtls_config.h"

#if defined (MBEDTLS_ARCH_IS_X86)
#undef MBEDTLS_AESNI_C
#endif

0 comments on commit 28552b5

Please sign in to comment.