Skip to content

Commit 2036815

Browse files
committed
Revert AWS MINGW -D_WIN32_WINNT and add requirement to GCS
1 parent 86e45ff commit 2036815

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3475,6 +3475,12 @@ function(build_google_cloud_cpp_storage)
34753475

34763476
prepare_fetchcontent()
34773477

3478+
# google-cloud-cpp v3+ uses BCryptHash() which requires Windows 10+
3479+
if(MINGW)
3480+
string(APPEND CMAKE_C_FLAGS " -D_WIN32_WINNT=0x0A01")
3481+
string(APPEND CMAKE_CXX_FLAGS " -D_WIN32_WINNT=0x0A01")
3482+
endif()
3483+
34783484
message(STATUS "Only building the google-cloud-cpp::storage component")
34793485
# Disable auto-added features (monitoring, trace, opentelemetry, universe_domain)
34803486
# that require gRPC - storage only needs REST/curl.
@@ -3893,13 +3899,13 @@ function(build_awssdk)
38933899
set(MINIMIZE_SIZE ON)
38943900
set(USE_OPENSSL ON)
38953901

3896-
# For aws-c-common and google-cloud-cpp
3902+
# For aws-c-common
38973903
if(MINGW)
3898-
# PPROCESSOR_NUMBER requires Windows 10 or later.
3904+
# PPROCESSOR_NUMBER requires Windows 7 or later.
38993905
#
3900-
# 0x0A01 == _WIN32_WINNT_WIN10
3901-
string(APPEND CMAKE_C_FLAGS " -D_WIN32_WINNT=0x0A01")
3902-
string(APPEND CMAKE_CXX_FLAGS " -D_WIN32_WINNT=0x0A01")
3906+
# 0x0601 == _WIN32_WINNT_WIN7
3907+
string(APPEND CMAKE_C_FLAGS " -D_WIN32_WINNT=0x0601")
3908+
string(APPEND CMAKE_CXX_FLAGS " -D_WIN32_WINNT=0x0601")
39033909
endif()
39043910

39053911
# For aws-lc

0 commit comments

Comments
 (0)