Skip to content

Commit 39fc8b5

Browse files
committed
Build s2n on apple
1 parent 681ac5a commit 39fc8b5

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

crt/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ option(AWS_USE_LIBCRYPTO_TO_SUPPORT_ED25519_EVERYWHERE "Set this if you want to
3232
string(REPLACE "-g" "-g1" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
3333
string(REPLACE "-g" "-g1" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
3434

35-
# On Unix we use S2N for TLS and AWS-LC crypto.
36-
# (On Windows and Apple we use the default OS libraries)
37-
if ((UNIX AND NOT APPLE) OR AWS_USE_LIBCRYPTO_TO_SUPPORT_ED25519_EVERYWHERE)
35+
# On Linux and BSD, we use S2N for TLS and AWS-LC crypto.
36+
# On Windows, we use the default OS libraries.
37+
# On Apple, we use the default OS libraries by default, but support S2N usage.
38+
if (UNIX OR AWS_USE_LIBCRYPTO_TO_SUPPORT_ED25519_EVERYWHERE)
3839
option(USE_OPENSSL "Set this if you want to use your system's OpenSSL compatible libcrypto" OFF)
3940
include(AwsPrebuildDependency)
4041

@@ -48,7 +49,7 @@ if ((UNIX AND NOT APPLE) OR AWS_USE_LIBCRYPTO_TO_SUPPORT_ED25519_EVERYWHERE)
4849
-DCMAKE_BUILD_TYPE=RelWithDebInfo # Use the same build type as the rest of the project
4950
)
5051

51-
if (APPLE OR WIN32)
52+
if (WIN32)
5253
# Libcrypto implementations typically have several chunky pregenerated tables that add a lot
5354
# to artifact size. We dont really need them for ed25519 case on win/mac, so favor
5455
# smaller binary over perf here.
@@ -72,7 +73,7 @@ if ((UNIX AND NOT APPLE) OR AWS_USE_LIBCRYPTO_TO_SUPPORT_ED25519_EVERYWHERE)
7273

7374
endif()
7475

75-
if(UNIX AND NOT APPLE)
76+
if(UNIX)
7677
# prebuild s2n-tls.
7778
aws_prebuild_dependency(
7879
DEPENDENCY_NAME S2N

0 commit comments

Comments
 (0)