Skip to content

Commit 944c7e1

Browse files
Mikhail PaulyshkaChristian Luca Civello
authored andcommitted
cmake: add WOLFSSL_X86_64_BUILD_ASM option
1 parent fca2f14 commit 944c7e1

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,7 @@ endif()
15771577
# Set processor-specific build macros
15781578
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64|AMD64")
15791579
set(WOLFSSL_X86_64_BUILD ON)
1580+
add_option("WOLFSSL_X86_64_BUILD_ASM" "Build ASM files" "yes" "yes;no")
15801581
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_X86_64_BUILD")
15811582
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64|arm64")
15821583
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_AARCH64_BUILD")

cmake/functions.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,10 @@ function(generate_lib_src_list LIB_SOURCES)
510510
endif()
511511

512512
if(BUILD_SP_X86_64)
513-
list(APPEND LIB_SOURCES
514-
wolfcrypt/src/sp_x86_64.c
515-
wolfcrypt/src/sp_x86_64_asm.S)
513+
list(APPEND LIB_SOURCES wolfcrypt/src/sp_x86_64.c)
514+
if(WOLFSSL_X86_64_BUILD_ASM)
515+
list(APPEND LIB_SOURCES wolfcrypt/src/sp_x86_64_asm.S)
516+
endif()
516517
endif()
517518

518519
if(NOT BUILD_FIPS_V2 AND BUILD_SP_ARM32)

0 commit comments

Comments
 (0)