diff --git a/CMakeLists.txt b/CMakeLists.txt index 039cfb07..c4155ed3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)