Skip to content

Commit c97725e

Browse files
stephanosionashif
authored andcommitted
cmake: Add LLVM RISC-V target
This commit updates the CMake target specification to handle the RISC-V architecture. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 993cb98 commit c97725e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmake/zephyr/llvm/target.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ if("${ARCH}" STREQUAL "arm")
2121
endif()
2222
elseif("${ARCH}" STREQUAL "arm64")
2323
set(triple aarch64-none-elf)
24-
# TODO: Add RISC-V target support.
24+
elseif("${ARCH}" STREQUAL "riscv")
25+
if(CONFIG_64BIT)
26+
set(triple riscv64-none-elf)
27+
else()
28+
set(triple riscv32-none-elf)
29+
endif()
2530
endif()
2631

2732
if(DEFINED triple)

0 commit comments

Comments
 (0)