From 0123b262138a145f12ed120213f2abbe44f7726f Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Wed, 16 Oct 2024 10:08:39 -0700 Subject: [PATCH 1/4] try prebuild --- crt/aws-c-auth | 2 +- crt/aws-c-cal | 2 +- crt/aws-c-common | 2 +- crt/aws-c-compression | 2 +- crt/aws-c-http | 2 +- crt/aws-c-io | 2 +- crt/aws-c-sdkutils | 2 +- crt/aws-checksums | 2 +- crt/aws-lc | 2 +- crt/s2n | 2 +- native/CMakeLists.txt | 33 ++++++++++++++++++++++++++++----- 11 files changed, 38 insertions(+), 15 deletions(-) diff --git a/crt/aws-c-auth b/crt/aws-c-auth index 53a31ba..48d647b 160000 --- a/crt/aws-c-auth +++ b/crt/aws-c-auth @@ -1 +1 @@ -Subproject commit 53a31bacf2918e848e00b052d2e25cba0be069d9 +Subproject commit 48d647bf43f8872e4dc5ec6343b0c5974195fbdd diff --git a/crt/aws-c-cal b/crt/aws-c-cal index 96c47e3..2cb1d2e 160000 --- a/crt/aws-c-cal +++ b/crt/aws-c-cal @@ -1 +1 @@ -Subproject commit 96c47e339d030d1fa4eaca201be948bc4442510d +Subproject commit 2cb1d2eac925e2dbc45025eb89af82bd790c23a0 diff --git a/crt/aws-c-common b/crt/aws-c-common index 4f874ce..f8c5d8e 160000 --- a/crt/aws-c-common +++ b/crt/aws-c-common @@ -1 +1 @@ -Subproject commit 4f874cea50a70bc6ebcd85c6ce1c6c0016b5aff4 +Subproject commit f8c5d8e5134fa97955351a44f16b84f96de24045 diff --git a/crt/aws-c-compression b/crt/aws-c-compression index ea1d421..f36d016 160000 --- a/crt/aws-c-compression +++ b/crt/aws-c-compression @@ -1 +1 @@ -Subproject commit ea1d421a421ad83a540309a94c38d50b6a5d836b +Subproject commit f36d01672d61e49d96a777870d456f66fa391cd4 diff --git a/crt/aws-c-http b/crt/aws-c-http index d83f8d7..6068653 160000 --- a/crt/aws-c-http +++ b/crt/aws-c-http @@ -1 +1 @@ -Subproject commit d83f8d70143ddce5ab4e479175fbd44ba994211b +Subproject commit 6068653e1d582bd8e7d1c9f81f86beaf10444e3d diff --git a/crt/aws-c-io b/crt/aws-c-io index 878b4fa..e363740 160000 --- a/crt/aws-c-io +++ b/crt/aws-c-io @@ -1 +1 @@ -Subproject commit 878b4fa027bda4041493f06e0562d5e98bb3deb8 +Subproject commit e36374047beadc72a0eb6df14ce3cbc822a789a3 diff --git a/crt/aws-c-sdkutils b/crt/aws-c-sdkutils index 8c7af71..4658412 160000 --- a/crt/aws-c-sdkutils +++ b/crt/aws-c-sdkutils @@ -1 +1 @@ -Subproject commit 8c7af71f91ed5b9d2a043d51f120495f43723f80 +Subproject commit 4658412a61ad5749db92a8d1e0717cb5e76ada1c diff --git a/crt/aws-checksums b/crt/aws-checksums index aac442a..ce04ab0 160000 --- a/crt/aws-checksums +++ b/crt/aws-checksums @@ -1 +1 @@ -Subproject commit aac442a2dbbb5e72d0a3eca8313cf65e7e1cac2f +Subproject commit ce04ab00b3ecc41912f478bfedca39f8e1919d6b diff --git a/crt/aws-lc b/crt/aws-lc index 4e54dd8..8b2ebfc 160000 --- a/crt/aws-lc +++ b/crt/aws-lc @@ -1 +1 @@ -Subproject commit 4e54dd8363396f257d7a2317c48101e18170e6fb +Subproject commit 8b2ebfcf3fc8b0656f1f4161166484a70238aeaa diff --git a/crt/s2n b/crt/s2n index 114ccab..ffe0bf4 160000 --- a/crt/s2n +++ b/crt/s2n @@ -1 +1 @@ -Subproject commit 114ccab0ff2cde491203ac841837d0d39b767412 +Subproject commit ffe0bf42da8f139eff8fd2237f47fbde40b478fb diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index d74a3c6..3b6d20b 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -51,12 +51,35 @@ if (BUILD_DEPS) set(BUILD_TESTING OFF) add_subdirectory(../crt/aws-c-common ${CMAKE_BINARY_DIR}/deps/aws-c-common) if (UNIX AND NOT APPLE) - set(DISABLE_PERL ON CACHE BOOL "Disable Perl for AWS-LC.") - set(DISABLE_GO ON CACHE BOOL "Disable Go for AWS-LC.") + include(AwsPrebuildDependency) set(SEARCH_LIBCRYPTO OFF CACHE BOOL "libcrypto will come from aws-lc, don't look for it") - set(BUILD_LIBSSL OFF) - add_subdirectory(../crt/aws-lc ${CMAKE_BINARY_DIR}/deps/aws-lc) - add_subdirectory(../crt/s2n ${CMAKE_BINARY_DIR}/deps/s2n) + 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 + ) + if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5.0") + # Disable AVX512 on old GCC that not supports it. + list(APPEND AWSLC_CMAKE_ARGUMENTS -DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX=ON) + endif() + + # 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}/crt/aws-lc + CMAKE_ARGUMENTS ${AWSLC_CMAKE_ARGUMENTS} + ) + + # prebuild s2n-tls. + aws_prebuild_dependency( + DEPENDENCY_NAME S2N + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/crt/s2n + CMAKE_ARGUMENTS + -DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF + -DBUILD_TESTING=OFF + ) + endif() add_subdirectory(../crt/aws-c-io ${CMAKE_BINARY_DIR}/deps/aws-c-io) add_subdirectory(../crt/aws-c-sdkutils ${CMAKE_BINARY_DIR}/deps/sdkutils) From a88007db82302beefc24d576bfe2bb00fe3df197 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Wed, 16 Oct 2024 10:13:16 -0700 Subject: [PATCH 2/4] try lowercase --- native/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index 3b6d20b..d150e72 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -66,14 +66,14 @@ if (BUILD_DEPS) # s2n-tls uses libcrypto during its configuration, so we need to prebuild aws-lc. aws_prebuild_dependency( - DEPENDENCY_NAME AWSLC + DEPENDENCY_NAME aws-lc SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/crt/aws-lc CMAKE_ARGUMENTS ${AWSLC_CMAKE_ARGUMENTS} ) # prebuild s2n-tls. aws_prebuild_dependency( - DEPENDENCY_NAME S2N + DEPENDENCY_NAME s2n SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/crt/s2n CMAKE_ARGUMENTS -DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF From d1cbb198c1c6941852976bdf934338df683913bb Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Wed, 16 Oct 2024 10:15:48 -0700 Subject: [PATCH 3/4] parent dir --- native/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index d150e72..796063c 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -66,15 +66,15 @@ if (BUILD_DEPS) # s2n-tls uses libcrypto during its configuration, so we need to prebuild aws-lc. aws_prebuild_dependency( - DEPENDENCY_NAME aws-lc - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/crt/aws-lc + DEPENDENCY_NAME AWSLC + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../crt/aws-lc CMAKE_ARGUMENTS ${AWSLC_CMAKE_ARGUMENTS} ) # prebuild s2n-tls. aws_prebuild_dependency( - DEPENDENCY_NAME s2n - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/crt/s2n + DEPENDENCY_NAME S2N + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../crt/s2n CMAKE_ARGUMENTS -DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF -DBUILD_TESTING=OFF From 38849d8bfdf06a6e02f8354409361c92f2ea3147 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Wed, 16 Oct 2024 13:20:25 -0700 Subject: [PATCH 4/4] latest submodules --- crt/aws-c-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crt/aws-c-common b/crt/aws-c-common index f8c5d8e..f58e807 160000 --- a/crt/aws-c-common +++ b/crt/aws-c-common @@ -1 +1 @@ -Subproject commit f8c5d8e5134fa97955351a44f16b84f96de24045 +Subproject commit f58e807d8fd643bd9a96eef182c1db37d01b88e7