Add freestanding riscv64 toolchain
This commit is contained in:
2
cmake/zig-toolchain-riscv64.cmake
Normal file
2
cmake/zig-toolchain-riscv64.cmake
Normal file
@@ -0,0 +1,2 @@
|
||||
set(ZIG_TARGET "riscv64-freestanding-none")
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/zig-toolchain.cmake)
|
||||
@@ -18,8 +18,12 @@ elseif(ZIG_OS STREQUAL "windows")
|
||||
set(CMAKE_SYSTEM_NAME "Windows")
|
||||
elseif(ZIG_OS STREQUAL "macos")
|
||||
set(CMAKE_SYSTEM_NAME "Darwin")
|
||||
elseif(ZIG_OS STREQUAL "freestanding")
|
||||
set(CMAKE_SYSTEM_NAME "Generic")
|
||||
else()
|
||||
message(WARNING "Unknown OS: ${ZIG_OS}")
|
||||
# NOTE: If this happens, add a new case with one of the following system names:
|
||||
# https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html#system-names-known-to-cmake
|
||||
message(FATAL_ERROR "Unknown OS: ${ZIG_OS}")
|
||||
endif()
|
||||
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
Reference in New Issue
Block a user