Skip to content

Commit

Permalink
Prebuild aws-lc (#584)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Graeb <[email protected]>
  • Loading branch information
sfod and graebm authored Oct 8, 2024
1 parent 49959e3 commit 8a86f28
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions crt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,26 @@ if(UNIX AND NOT APPLE)
option(USE_OPENSSL "Set this if you want to use your system's OpenSSL compatible libcrypto" OFF)

if(NOT USE_OPENSSL)
set(DISABLE_GO ON CACHE BOOL "Build without using Go, we don't want the extra dependency")
set(BUILD_LIBSSL OFF CACHE BOOL "Don't need libssl, only need libcrypto")
include(AwsPrebuildDependency)

set(AWSLC_CMAKE_ARGUMENTS
-DDISABLE_GO=ON # Build without using Go, we don't want the extra dependency
-DDISABLE_PERL=ON # Build without using Perl, we don't want the extra dependency
-DBUILD_LIBSSL=OFF # Don't need libssl, only need libcrypto
-DBUILD_TESTING=OFF
)

set(DISABLE_PERL ON CACHE BOOL "Build without using Perl, we don't want the extra dependency")
if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5.0")
set(MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX ON CACHE BOOL "Disable AVX512 on old GCC that not supports it")
# Disable AVX512 on old GCC that not supports it.
list(APPEND AWSLC_CMAKE_ARGUMENTS -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON)
endif()

add_subdirectory(aws-lc)
# s2n-tls uses libcrypto during its configuration, so we need to prebuild aws-lc.
aws_prebuild_dependency(
DEPENDENCY_NAME AWSLC
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/aws-lc
CMAKE_ARGUMENTS ${AWSLC_CMAKE_ARGUMENTS}
)
endif()

set(UNSAFE_TREAT_WARNINGS_AS_ERRORS OFF CACHE BOOL "")
Expand Down

0 comments on commit 8a86f28

Please sign in to comment.