From f1acfccba59d320d61d9b4da2c2cc2b2ee7e144c Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Mon, 12 Aug 2024 12:03:07 -0700 Subject: [PATCH] Prebuild aws-lc --- crt/CMakeLists.txt | 20 ++++++++++++++------ crt/aws-c-cal | 2 +- crt/aws-c-common | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/crt/CMakeLists.txt b/crt/CMakeLists.txt index 99296e6e7..753d88ff6 100644 --- a/crt/CMakeLists.txt +++ b/crt/CMakeLists.txt @@ -32,15 +32,23 @@ 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") - - 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") + set(AWSLC_MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX ON CACHE BOOL "Disable AVX512 on old GCC that not supports it") + else() + set(AWSLC_MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX OFF CACHE BOOL "Disable AVX512 on old GCC that not supports it") 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}/crt/aws-lc + CMAKE_ARGUMENTS + -DDISABLE_GO=ON + -DDISABLE_PERL=ON + -DBUILD_LIBSSL=OFF + -DBUILD_TESTING=OFF + -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=${AWSLC_MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX} + ) endif() set(UNSAFE_TREAT_WARNINGS_AS_ERRORS OFF CACHE BOOL "") diff --git a/crt/aws-c-cal b/crt/aws-c-cal index 71810b1ad..8232595f5 160000 --- a/crt/aws-c-cal +++ b/crt/aws-c-cal @@ -1 +1 @@ -Subproject commit 71810b1ade7af4747104ae245b74240ae8e8cf77 +Subproject commit 8232595f5344854fdeb74c80054742567673287a diff --git a/crt/aws-c-common b/crt/aws-c-common index 6d974f92c..d6004d333 160000 --- a/crt/aws-c-common +++ b/crt/aws-c-common @@ -1 +1 @@ -Subproject commit 6d974f92c1d86391c1dcb1173239adf757c52b2d +Subproject commit d6004d3337c43275115bfddae289b787ebbf4d55