Skip to content

Commit

Permalink
Move patch hunks into ThirdpartyToolchain.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Jan 30, 2025
1 parent 0694138 commit 53a17a0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 37 deletions.
15 changes: 0 additions & 15 deletions ci/rtools/aws_c_common_ep.patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@
# specific language governing permissions and limitations
# under the License.

diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake
index b717bca..5aa8ac9 100644
--- a/cmake/AwsCFlags.cmake
+++ b/cmake/AwsCFlags.cmake
@@ -120,6 +120,10 @@ function(aws_set_common_properties target)
list(APPEND AWS_C_FLAGS -Wno-strict-aliasing)
endif()

+ if (CMAKE_C_IMPLICIT_LINK_LIBRARIES MATCHES "mingw32")
+ list(APPEND AWS_C_FLAGS -D__USE_MINGW_ANSI_STDIO=1 -Wno-unused-local-typedefs)
+ endif()
+
# -moutline-atomics generates code for both older load/store exclusive atomics and also
# Arm's Large System Extensions (LSE) which scale substantially better on large core count systems.
#
diff --git a/include/aws/common/byte_order.inl b/include/aws/common/byte_order.inl
index 1204be0..0abd9cb 100644
--- a/include/aws/common/byte_order.inl
Expand Down
20 changes: 0 additions & 20 deletions ci/rtools/awssdk_ep.patch
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,6 @@ index 2b5bbc566..7cb93bdf0 100644
std::copy(other.m_data.get(), other.m_data.get() + other.m_size, stdext::checked_array_iterator< T * >(m_data.get(), m_size));
#else
std::copy(other.m_data.get(), other.m_data.get() + other.m_size, m_data.get());
diff --git a/aws-cpp-sdk-core/include/aws/core/utils/crypto/bcrypt/CryptoImpl.h b/aws-cpp-sdk-core/include/aws/core/utils/crypto/bcrypt/CryptoImpl.h
index e26e36b60..3e7189b70 100644
--- a/aws-cpp-sdk-core/include/aws/core/utils/crypto/bcrypt/CryptoImpl.h
+++ b/aws-cpp-sdk-core/include/aws/core/utils/crypto/bcrypt/CryptoImpl.h
@@ -29,7 +29,14 @@ namespace Aws
{
namespace Crypto
{
- static const char* SecureRandom_BCrypt_Tag = "SecureRandom_BCrypt";
+#ifdef __MINGW32__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#endif
+ static const char* SecureRandom_BCrypt_Tag = "SecureRandom_BCrypt";
+#ifdef __MINGW32__
+#pragma GCC diagnostic pop
+#endif

class SecureRandomBytes_BCrypt : public SecureRandomBytes
{
diff --git a/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp b/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp
index 4dade6489..a0456cf8e 100644
--- a/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5049,11 +5049,11 @@ macro(build_awssdk)
if(WIN32 AND NOT MSVC)
string(APPEND
AWS_C_FLAGS
" -D_WIN32_WINNT=0x0601 -Wno-error -Wno-error=format= -Wno-error=format-extra-args"
" -D_WIN32_WINNT=0x0601 -D__USE_MINGW_ANSI_STDIO=1 -Wno-error -Wno-error=format= -Wno-error=format-extra-args -Wno-unused-local-typedefs -Wno-unused-variable"
)
string(APPEND
AWS_CXX_FLAGS
" -D_WIN32_WINNT=0x0601 -Wno-error -Wno-error=format= -Wno-error=format-extra-args"
" -D_WIN32_WINNT=0x0601 -D__USE_MINGW_ANSI_STDIO=1 -Wno-error -Wno-error=format= -Wno-error=format-extra-args -Wno-unused-local-typedefs -Wno-unused-variable"
)
endif()

Expand Down

0 comments on commit 53a17a0

Please sign in to comment.