[vcpkg] improve s390x support
MODIFY
src/vcpkg.cpp
src/vcpkg.cpp
@@ -235,11 +235,13 @@ int main(const int argc, const char* const* const argv)
load_config(fs);
-#if (defined(__aarch64__) || defined(__arm__) || defined(_M_ARM) || defined(_M_ARM64)) && !defined(_WIN32)
+#if (defined(__aarch64__) || defined(__arm__) || defined(__s390x__) || defined(_M_ARM) || defined(_M_ARM64)) && \
+ !defined(_WIN32)
if (!System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value())
{
- Checks::exit_with_message(VCPKG_LINE_INFO,
- "Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm platform.");
+ Checks::exit_with_message(
+ VCPKG_LINE_INFO,
+ "Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm and s390x platforms.");
}
#endif

MODIFY
src/vcpkg/triplet.cpp
src/vcpkg/triplet.cpp
@@ -61,6 +61,10 @@ namespace vcpkg
{
return CPUArchitecture::ARM64;
}
+ if (Strings::starts_with(this->canonical_name(), "s390x-"))
+ {
+ return CPUArchitecture::S390X;
+ }
return nullopt;
}
@@ -91,6 +95,8 @@ namespace vcpkg
return Triplet::from_canonical_name("arm64-linux");
#elif defined(__arm__)
return Triplet::from_canonical_name("arm-linux");
+#elif defined(__s390x__)
+ return Triplet::from_canonical_name("s390x-linux");
#else
return Triplet::from_canonical_name("x64-linux");
#endif

[vcpkg] improve s390x support (#13386)

Signed-off-by: Andrei Lebedev <lebdron@gmail.com>