Add initial risc-v support (#29593)

This commit is contained in:
Yingwei Zheng 2023-02-23 04:44:40 +08:00 committed by GitHub
parent e83c4a9f25
commit 5c98346399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 0 deletions

View File

@ -322,6 +322,10 @@ else()
set(Z_VCPKG_TARGET_TRIPLET_ARCH arm)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|ARM64)$")
set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "riscv32")
set(Z_VCPKG_TARGET_TRIPLET_ARCH riscv32)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "riscv64")
set(Z_VCPKG_TARGET_TRIPLET_ARCH riscv64)
else()
if(Z_VCPKG_CMAKE_IN_TRY_COMPILE)
message(STATUS "Unable to determine target architecture, continuing without vcpkg.")

View File

@ -0,0 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE riscv32)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)

View File

@ -0,0 +1,5 @@
set(VCPKG_TARGET_ARCHITECTURE riscv32)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)

View File

@ -0,0 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE riscv64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)

View File

@ -0,0 +1,5 @@
set(VCPKG_TARGET_ARCHITECTURE riscv64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)