[vcpkg] Add initial s390x support
MODIFY
include/vcpkg/base/system.h
include/vcpkg/base/system.h
@@ -25,6 +25,7 @@ namespace vcpkg::System
X64,
ARM,
ARM64,
+ S390X,
};
Optional<CPUArchitecture> to_cpu_architecture(StringView arch);

MODIFY
src/vcpkg/base/system.cpp
src/vcpkg/base/system.cpp
@@ -19,6 +19,7 @@ namespace vcpkg
if (Strings::case_insensitive_ascii_equals(arch, "amd64")) return CPUArchitecture::X64;
if (Strings::case_insensitive_ascii_equals(arch, "arm")) return CPUArchitecture::ARM;
if (Strings::case_insensitive_ascii_equals(arch, "arm64")) return CPUArchitecture::ARM64;
+ if (Strings::case_insensitive_ascii_equals(arch, "s390x")) return CPUArchitecture::S390X;
return nullopt;
}
@@ -30,6 +31,7 @@ namespace vcpkg
case CPUArchitecture::X64: return "x64";
case CPUArchitecture::ARM: return "arm";
case CPUArchitecture::ARM64: return "arm64";
+ case CPUArchitecture::S390X: return "s390x";
default: Checks::exit_with_message(VCPKG_LINE_INFO, "unexpected vcpkg::System::CPUArchitecture");
}
}
@@ -51,6 +53,8 @@ namespace vcpkg
return CPUArchitecture::ARM;
#elif defined(__aarch64__) || defined(_M_ARM64)
return CPUArchitecture::ARM64;
+#elif defined(__s390x__)
+ return CPUArchitecture::S390X;
#else // choose architecture
#error "Unknown host architecture"
#endif // choose architecture

[vcpkg] Add initial s390x support (#12534)

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