1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-28 05:26:04 +02:00

Add temporary config files and settings for RISC-V development

This commit is contained in:
silvanshade 2024-01-17 23:41:37 -07:00
parent 4d32708f51
commit d60b753572
No known key found for this signature in database
3 changed files with 43 additions and 0 deletions

16
.cargo/config.toml Normal file
View File

@ -0,0 +1,16 @@
[env]
CC_riscv64gc-unknown-linux-gnu = "clang-17 --target=riscv64-unknown-linux-gnu -march=rv64gcv1p0 -fuse-ld=lld-17"
CXX_riscv64gc-unknown-linux-gnu = "clang++-17 --target=riscv64-unknown-linux-gnu -march=rv64gcv1p0 -fuse-ld=lld-17"
[build]
target = "riscv64gc-unknown-linux-gnu"
[target.riscv64gc-unknown-linux-gnu]
runner = "qemu-riscv64 -cpu rv64,v=true,vext_spec=v1.0"
linker = "clang-17"
rustflags = [
"-C", "link-arg=-fuse-ld=lld-17",
"-C", "link-arg=-march=rv64gcv1p0",
"-C", "link-arg=--target=riscv64-unknown-linux-gnu",
"-C", "target-feature=+v",
]

12
c/.clangd Normal file
View File

@ -0,0 +1,12 @@
Diagnostics:
Suppress:
- -Wimplicit-function-declaration
- fatal_too_many_errors
- typecheck_convert_incompatible
- undeclared_var_use
UnusedIncludes: None
InlayHints:
Designators: Yes
Enabled: Yes
ParameterNames: Yes
DeducedTypes: Yes

View File

@ -1,5 +1,20 @@
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
set(CMAKE_GENERATOR Ninja)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_CROSSCOMPILING_EMULATOR qemu-riscv64-static)
set(CMAKE_ASM_COMPILER clang-17)
set(CMAKE_ASM_COMPILER_TARGET riscv64-unknown-linux-gnu)
set(CMAKE_ASM_FLAGS_INIT "-march=rv64gcv1p0")
set(CMAKE_C_COMPILER clang-17)
set(CMAKE_C_COMPILER_TARGET riscv64-unknown-linux-gnu)
set(CMAKE_C_FLAGS_INIT "-march=rv64gcv1p0")
set(CMAKE_CXX_COMPILER clang++-17)
set(CMAKE_CXX_COMPILER_TARGET riscv64-unknown-linux-gnu)
set(CMAKE_CXX_FLAGS_INIT "-march=rv64gcv1p0")
set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld-17")
# respect C_EXTENSIONS OFF without explicitly setting C_STANDARD
if (POLICY CMP0128)
cmake_policy(SET CMP0128 NEW)