Skip to content

Commit

Permalink
revert all changes regarding --exclude-libs,libcrypto.a
Browse files Browse the repository at this point in the history
I don't have time right now to investigate the impact of this change
  • Loading branch information
graebm committed Aug 23, 2024
1 parent f681bc8 commit 0627591
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,6 @@ target_include_directories(${PROJECT_NAME} PUBLIC

aws_prepare_shared_lib_exports(${PROJECT_NAME})

if (UNIX AND NOT APPLE)
# Hide symbols from libcrypto.a
# This avoids problems when an application ends up using both libcrypto.a and libcrypto.so.
#
# An example of this happening is the aws-c-io tests.
# All the C libs are compiled statically, but then a PKCS#11 library is
# loaded at runtime which happens to use libcrypto.so from OpenSSL.
# If the symbols from libcrypto.a aren't hidden, then SOME function calls use the libcrypto.a implementation
# and SOME function calls use the libcrypto.so implementation, and this mismatch leads to weird crashes.
#
# Make this option PUBLIC so it's applied to every downstream shared lib or application.
target_link_options(${PROJECT_NAME} PUBLIC "LINKER:--exclude-libs,libcrypto.a")
endif()

configure_file("cmake/${PROJECT_NAME}-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
@ONLY)
Expand Down

0 comments on commit 0627591

Please sign in to comment.