mirror of https://github.com/microsoft/vcpkg.git
[abseil,boost-charconv,boost-locale,ceres,protobuf] fix x64-mingw-dynamic (#46701)
Co-authored-by: Kai Jia <kai@ecopiatech.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
ce81bd07ed
commit
70a7abe262
|
|
@ -29,6 +29,16 @@ if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static")
|
|||
set(ABSL_STATIC_RUNTIME_OPTION "-DABSL_MSVC_STATIC_RUNTIME=ON")
|
||||
endif()
|
||||
|
||||
set(ABSL_MINGW_OPTIONS "")
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
# LIBRT-NOTFOUND is needed since the system librt may be found by cmake in
|
||||
# a cross-compile setup.
|
||||
# See https://github.com/pywinrt/pywinrt/pull/83 for the FIReference
|
||||
# definition issue.
|
||||
set(ABSL_MINGW_OPTIONS "-DLIBRT=LIBRT-NOTFOUND"
|
||||
"-DCMAKE_CXX_FLAGS=-D____FIReference_1_boolean_INTERFACE_DEFINED__")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
|
|
@ -37,6 +47,7 @@ vcpkg_cmake_configure(
|
|||
${ABSL_USE_CXX17_OPTION}
|
||||
${ABSL_TEST_HELPERS_OPTIONS}
|
||||
${ABSL_STATIC_RUNTIME_OPTION}
|
||||
${ABSL_MINGW_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "abseil",
|
||||
"version": "20250127.1",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": [
|
||||
"Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.",
|
||||
"In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ vcpkg_from_github(
|
|||
)
|
||||
|
||||
set(FEATURE_OPTIONS "")
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_IS_MINGW)
|
||||
# when cross compile, cmake generates the error try_run() invoked in cross-compiling mode
|
||||
list(APPEND FEATURE_OPTIONS "-DBOOST_CHARCONV_QUADMATH_FOUND_EXITCODE=0")
|
||||
endif()
|
||||
boost_configure_and_install(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
|
||||
"name": "boost-charconv",
|
||||
"version": "1.88.0",
|
||||
"port-version": 1,
|
||||
"description": "Boost charconv module",
|
||||
"homepage": "https://www.boost.org/libs/charconv",
|
||||
"license": "BSL-1.0",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@ vcpkg_from_github(
|
|||
|
||||
set(FEATURE_OPTIONS "")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/features.cmake")
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_IS_MINGW)
|
||||
# mingw cross compile toolchain lacks std conv support
|
||||
list(APPEND FEATURE_OPTIONS "-DBOOST_LOCALE_ENABLE_STD=OFF")
|
||||
endif()
|
||||
boost_configure_and_install(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
|
||||
"name": "boost-locale",
|
||||
"version": "1.88.0",
|
||||
"port-version": 1,
|
||||
"description": "Boost locale module",
|
||||
"homepage": "https://www.boost.org/libs/locale",
|
||||
"license": "BSL-1.0",
|
||||
|
|
|
|||
|
|
@ -40,6 +40,11 @@ if(VCPKG_TARGET_IS_IOS)
|
|||
list(APPEND FEATURE_OPTIONS "-DIOS_DEPLOYMENT_TARGET=${VCPKG_OSX_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
|
||||
# Add big object support for MinGW
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
list(APPEND FEATURE_OPTIONS "-DCMAKE_CXX_FLAGS=-Wa,-mbig-obj")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "ceres",
|
||||
"version": "2.2.0",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": "non-linear optimization package",
|
||||
"homepage": "https://github.com/ceres-solver/ceres-solver",
|
||||
"license": "Apache-2.0",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
|
||||
index 56f995e45e..bc7a01e534 100644
|
||||
--- a/src/google/protobuf/port_def.inc
|
||||
+++ b/src/google/protobuf/port_def.inc
|
||||
@@ -228,11 +228,12 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
|
||||
#endif
|
||||
#if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \
|
||||
!defined(_ARCH_PPC) && !defined(__wasm__) && \
|
||||
- !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__)
|
||||
+ !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) && !defined(__MINGW32__)
|
||||
// Compilation fails on ARM32: b/195943306
|
||||
// Compilation fails on powerpc64le: b/187985113
|
||||
// Compilation fails on X86 Windows:
|
||||
// https://github.com/llvm/llvm-project/issues/53271
|
||||
+// Compilation fails on MINGW: https://github.com/protocolbuffers/protobuf/issues/21625
|
||||
#define PROTOBUF_MUSTTAIL [[clang::musttail]]
|
||||
#define PROTOBUF_TAILCALL true
|
||||
#else
|
||||
|
|
@ -9,6 +9,7 @@ vcpkg_from_github(
|
|||
fix-default-proto-file-path.patch
|
||||
fix-utf8-range.patch
|
||||
fix-install-dirs.patch
|
||||
fix-mingw-tail-call.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" protobuf_BUILD_PROTOC_BINARIES)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "protobuf",
|
||||
"version": "5.29.5",
|
||||
"port-version": 1,
|
||||
"description": "Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.",
|
||||
"homepage": "https://github.com/protocolbuffers/protobuf",
|
||||
"license": "BSD-3-Clause",
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ $semverVersion = ($version -replace "(\d+(\.\d+){1,3}).*", "`$1")
|
|||
# Clear this array when moving to a new boost version
|
||||
$defaultPortVersion = 0
|
||||
$portVersions = @{
|
||||
'boost-charconv' = 1;
|
||||
'boost-locale' = 1;
|
||||
}
|
||||
|
||||
function Get-PortVersion {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_IS_MINGW)
|
||||
# when cross compile, cmake generates the error try_run() invoked in cross-compiling mode
|
||||
list(APPEND FEATURE_OPTIONS "-DBOOST_CHARCONV_QUADMATH_FOUND_EXITCODE=0")
|
||||
endif()
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_IS_MINGW)
|
||||
# mingw cross compile toolchain lacks std conv support
|
||||
list(APPEND FEATURE_OPTIONS "-DBOOST_LOCALE_ENABLE_STD=OFF")
|
||||
endif()
|
||||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "77d9d95320ba6300dccfde18b9bee6c93795461e",
|
||||
"version": "20250127.1",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "15a046bb4ccc8e59bc9f31df290400a07c587675",
|
||||
"version": "20250127.1",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "859e7bb591f69fe28ee2ce640a341c3be30075c9",
|
||||
"version": "1.88.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "774cea931cf10e80061780d8467e7ea5f494ca03",
|
||||
"version": "1.88.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "7021457116baad60cefbbf264e5757da594dabf4",
|
||||
"version": "1.88.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "4ba4b7944265f4cece979cc6569d9ab3b87f282c",
|
||||
"version": "1.88.0",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
},
|
||||
"abseil": {
|
||||
"baseline": "20250127.1",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"absent": {
|
||||
"baseline": "0.3.1",
|
||||
|
|
@ -846,7 +846,7 @@
|
|||
},
|
||||
"boost-charconv": {
|
||||
"baseline": "1.88.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"boost-chrono": {
|
||||
"baseline": "1.88.0",
|
||||
|
|
@ -1086,7 +1086,7 @@
|
|||
},
|
||||
"boost-locale": {
|
||||
"baseline": "1.88.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"boost-lockfree": {
|
||||
"baseline": "1.88.0",
|
||||
|
|
@ -1642,7 +1642,7 @@
|
|||
},
|
||||
"ceres": {
|
||||
"baseline": "2.2.0",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"cfitsio": {
|
||||
"baseline": "3.49",
|
||||
|
|
@ -7594,7 +7594,7 @@
|
|||
},
|
||||
"protobuf": {
|
||||
"baseline": "5.29.5",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"protobuf-c": {
|
||||
"baseline": "1.5.2",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "990a68bdbd8678fc0c74294470228bf70a33cc75",
|
||||
"version": "2.2.0",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "b1913608889f8a846b03535473b16f60a2b3b5d1",
|
||||
"version": "2.2.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "7e946d4afefe3c33f74394d788f89c41e6881a77",
|
||||
"version": "5.29.5",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "a5e9b41d69815a0ce0573afe7074b718fa82edba",
|
||||
"version": "5.29.5",
|
||||
|
|
|
|||
Loading…
Reference in New Issue