Skip to content

Commit

Permalink
Add initial risc-v support (microsoft#29593)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcxzyw authored Feb 22, 2023
1 parent e83c4a9 commit 5c98346
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/buildsystems/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
6 changes: 6 additions & 0 deletions triplets/community/riscv32-linux-release.cmake
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 5 additions & 0 deletions triplets/community/riscv32-linux.cmake
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 6 additions & 0 deletions triplets/community/riscv64-linux-release.cmake
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 5 additions & 0 deletions triplets/community/riscv64-linux.cmake
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 5c98346

Please sign in to comment.