Skip to content

Commit b41b663

Browse files
committed
Use aws-lc to intern symbols in s2n-tls
1 parent 63c642e commit b41b663

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

cpp/cmake_modules/ThirdpartyToolchain.cmake

+12-2
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,8 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.28)
10281028
endif()
10291029

10301030
macro(prepare_fetchcontent)
1031+
# CACHE is for products that still use OLD as CMP0077 (option()
1032+
# honors normal variables).
10311033
set(BUILD_SHARED_LIBS
10321034
OFF
10331035
CACHE BOOL "" FORCE)
@@ -5041,10 +5043,10 @@ function(build_awssdk)
50415043
message(STATUS "Building AWS SDK for C++ from source")
50425044

50435045
set(AWSSDK_PRODUCTS aws-c-common aws-checksums)
5044-
# s2n-tls only needed on Linux.
5046+
# aws-lc and s2n-tls only needed on Linux.
50455047
# We can use LINUX with CMake 3.25 or later.
50465048
if(UNIX AND NOT APPLE)
5047-
list(APPEND AWSSDK_PRODUCTS s2n-tls)
5049+
list(APPEND AWSSDK_PRODUCTS aws-lc s2n-tls)
50485050
endif()
50495051
list(APPEND
50505052
AWSSDK_PRODUCTS
@@ -5110,6 +5112,14 @@ function(build_awssdk)
51105112
ON
51115113
CACHE BOOL "" FORCE)
51125114

5115+
# For s2n-tls
5116+
set(crypto_STATIC_LIBRARY
5117+
"$<TARGET_FILE:crypto>"
5118+
CACHE STRING "" FORCE)
5119+
set(S2N_INTERN_LIBCRYPTO
5120+
ON
5121+
CACHE BOOL "" FORCE)
5122+
51135123
set(AWSSDK_LINK_LIBRARIES)
51145124
foreach(AWSSDK_PRODUCT ${AWSSDK_PRODUCTS})
51155125
fetchcontent_makeavailable(${AWSSDK_PRODUCT})

0 commit comments

Comments
 (0)