diff --git a/ports/triplets/arm64-osx-asan.cmake b/ports/triplets/arm64-osx-asan.cmake index 4aa2d22af54..d9980f09378 100644 --- a/ports/triplets/arm64-osx-asan.cmake +++ b/ports/triplets/arm64-osx-asan.cmake @@ -7,3 +7,9 @@ set(VCPKG_OSX_ARCHITECTURES arm64) set(VCPKG_C_FLAGS "-fsanitize=address") set(VCPKG_CXX_FLAGS "-fsanitize=address") + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/arm64-osx-release.cmake b/ports/triplets/arm64-osx-release.cmake index 0f0d0b2f20b..0b02711121d 100644 --- a/ports/triplets/arm64-osx-release.cmake +++ b/ports/triplets/arm64-osx-release.cmake @@ -7,3 +7,9 @@ set(VCPKG_OSX_ARCHITECTURES arm64) set(VCPKG_OSX_DEPLOYMENT_TARGET 11) set(VCPKG_BUILD_TYPE release) + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/arm64-osx-relwithdebinfo.cmake b/ports/triplets/arm64-osx-relwithdebinfo.cmake index 592c7f2ae83..36b81fa41ac 100644 --- a/ports/triplets/arm64-osx-relwithdebinfo.cmake +++ b/ports/triplets/arm64-osx-relwithdebinfo.cmake @@ -8,3 +8,9 @@ set(VCPKG_OSX_DEPLOYMENT_TARGET 11) set(VCPKG_CXX_FLAGS "-g") set(VCPKG_C_FLAGS "-g") + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/arm64-osx.cmake b/ports/triplets/arm64-osx.cmake index 348949babcf..c41b4ea47af 100644 --- a/ports/triplets/arm64-osx.cmake +++ b/ports/triplets/arm64-osx.cmake @@ -5,3 +5,9 @@ set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES arm64) set(VCPKG_OSX_DEPLOYMENT_TARGET 11) + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/x64-linux-asan.cmake b/ports/triplets/x64-linux-asan.cmake index 747d7d62020..bb3ce9143d8 100644 --- a/ports/triplets/x64-linux-asan.cmake +++ b/ports/triplets/x64-linux-asan.cmake @@ -6,3 +6,9 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(VCPKG_C_FLAGS "-fsanitize=address") set(VCPKG_CXX_FLAGS "-fsanitize=address") + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/x64-linux-release.cmake b/ports/triplets/x64-linux-release.cmake index 8a25c72e1e8..7db4de766ae 100644 --- a/ports/triplets/x64-linux-release.cmake +++ b/ports/triplets/x64-linux-release.cmake @@ -5,3 +5,9 @@ set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(VCPKG_BUILD_TYPE release) + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/x64-linux-relwithdebinfo.cmake b/ports/triplets/x64-linux-relwithdebinfo.cmake index 533c1f3928c..4bde165e3b9 100644 --- a/ports/triplets/x64-linux-relwithdebinfo.cmake +++ b/ports/triplets/x64-linux-relwithdebinfo.cmake @@ -6,3 +6,9 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(VCPKG_CXX_FLAGS "-g") set(VCPKG_C_FLAGS "-g") + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/x64-linux.cmake b/ports/triplets/x64-linux.cmake index ed59697f311..96a76c50a15 100644 --- a/ports/triplets/x64-linux.cmake +++ b/ports/triplets/x64-linux.cmake @@ -7,3 +7,9 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux) # For AWS SDK. Remove after update from 1.74 set(VCPKG_CXX_FLAGS "-Wno-error=nonnull -Wno-error=deprecated-declarations") set(VCPKG_C_FLAGS "-Wno-error=nonnull -Wno-error=deprecated-declarations") + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/x64-osx-asan.cmake b/ports/triplets/x64-osx-asan.cmake index aac0688e2c7..f4d7c141643 100644 --- a/ports/triplets/x64-osx-asan.cmake +++ b/ports/triplets/x64-osx-asan.cmake @@ -7,3 +7,9 @@ set(VCPKG_OSX_ARCHITECTURES x86_64) set(VCPKG_C_FLAGS "-fsanitize=address") set(VCPKG_CXX_FLAGS "-fsanitize=address") + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/x64-osx-release.cmake b/ports/triplets/x64-osx-release.cmake index 461a5a727ec..81d64e4b1f0 100644 --- a/ports/triplets/x64-osx-release.cmake +++ b/ports/triplets/x64-osx-release.cmake @@ -7,3 +7,9 @@ set(VCPKG_OSX_ARCHITECTURES x86_64) set(VCPKG_OSX_DEPLOYMENT_TARGET 11) set(VCPKG_BUILD_TYPE release) + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/x64-osx-relwithdebinfo.cmake b/ports/triplets/x64-osx-relwithdebinfo.cmake index db1bfabf76d..d22e1e1d6e1 100644 --- a/ports/triplets/x64-osx-relwithdebinfo.cmake +++ b/ports/triplets/x64-osx-relwithdebinfo.cmake @@ -8,3 +8,9 @@ set(VCPKG_OSX_DEPLOYMENT_TARGET 11) set(VCPKG_CXX_FLAGS "-g") set(VCPKG_C_FLAGS "-g") + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif() diff --git a/ports/triplets/x64-osx.cmake b/ports/triplets/x64-osx.cmake index e8a4c8d9d69..b77361c57d0 100644 --- a/ports/triplets/x64-osx.cmake +++ b/ports/triplets/x64-osx.cmake @@ -5,3 +5,9 @@ set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES x86_64) set(VCPKG_OSX_DEPLOYMENT_TARGET 11) + +# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries +# like arrow (https://github.com/apache/arrow/issues/42154). +if("${PORT}" MATCHES "^aws-") + set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden") +endif()