Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebuild aws-lc #584

Merged
merged 4 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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
Loading