Skip to content

Commit

Permalink
cmake: add WOLFSSL_X86_64_BUILD_ASM option
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Paulyshka authored and Christian Luca Civello committed Nov 8, 2023
1 parent fca2f14 commit 944c7e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ endif()
# Set processor-specific build macros
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64|AMD64")
set(WOLFSSL_X86_64_BUILD ON)
add_option("WOLFSSL_X86_64_BUILD_ASM" "Build ASM files" "yes" "yes;no")
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_X86_64_BUILD")
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64|arm64")
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_AARCH64_BUILD")
Expand Down
7 changes: 4 additions & 3 deletions cmake/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,10 @@ function(generate_lib_src_list LIB_SOURCES)
endif()

if(BUILD_SP_X86_64)
list(APPEND LIB_SOURCES
wolfcrypt/src/sp_x86_64.c
wolfcrypt/src/sp_x86_64_asm.S)
list(APPEND LIB_SOURCES wolfcrypt/src/sp_x86_64.c)
if(WOLFSSL_X86_64_BUILD_ASM)
list(APPEND LIB_SOURCES wolfcrypt/src/sp_x86_64_asm.S)
endif()
endif()

if(NOT BUILD_FIPS_V2 AND BUILD_SP_ARM32)
Expand Down

0 comments on commit 944c7e1

Please sign in to comment.