Skip to content

Commit

Permalink
Use aws-lc to intern symbols in s2n-tls
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 22, 2025
1 parent 63c642e commit b41b663
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,8 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.28)
endif()

macro(prepare_fetchcontent)
# CACHE is for products that still use OLD as CMP0077 (option()
# honors normal variables).
set(BUILD_SHARED_LIBS
OFF
CACHE BOOL "" FORCE)
Expand Down Expand Up @@ -5041,10 +5043,10 @@ function(build_awssdk)
message(STATUS "Building AWS SDK for C++ from source")

set(AWSSDK_PRODUCTS aws-c-common aws-checksums)
# s2n-tls only needed on Linux.
# aws-lc and s2n-tls only needed on Linux.
# We can use LINUX with CMake 3.25 or later.
if(UNIX AND NOT APPLE)
list(APPEND AWSSDK_PRODUCTS s2n-tls)
list(APPEND AWSSDK_PRODUCTS aws-lc s2n-tls)
endif()
list(APPEND
AWSSDK_PRODUCTS
Expand Down Expand Up @@ -5110,6 +5112,14 @@ function(build_awssdk)
ON
CACHE BOOL "" FORCE)

# For s2n-tls
set(crypto_STATIC_LIBRARY
"$<TARGET_FILE:crypto>"
CACHE STRING "" FORCE)
set(S2N_INTERN_LIBCRYPTO
ON
CACHE BOOL "" FORCE)

set(AWSSDK_LINK_LIBRARIES)
foreach(AWSSDK_PRODUCT ${AWSSDK_PRODUCTS})
fetchcontent_makeavailable(${AWSSDK_PRODUCT})
Expand Down

0 comments on commit b41b663

Please sign in to comment.