mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-26 20:50:36 +00:00
[vcpkg] Add initial s390x support (#12534)
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
This commit is contained in:
parent
0896cfcc30
commit
077c0746be
@ -151,6 +151,8 @@ else()
|
||||
endif()
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "s390x")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH s390x)
|
||||
else()
|
||||
if( _CMAKE_IN_TRY_COMPILE )
|
||||
message(STATUS "Unable to determine target architecture, continuing without vcpkg.")
|
||||
|
@ -25,6 +25,7 @@ namespace vcpkg::System
|
||||
X64,
|
||||
ARM,
|
||||
ARM64,
|
||||
S390X,
|
||||
};
|
||||
|
||||
Optional<CPUArchitecture> to_cpu_architecture(StringView arch);
|
||||
|
@ -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
|
||||
|
5
triplets/community/s390x-linux.cmake
Normal file
5
triplets/community/s390x-linux.cmake
Normal file
@ -0,0 +1,5 @@
|
||||
set(VCPKG_TARGET_ARCHITECTURE s390x)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
Loading…
Reference in New Issue
Block a user