diff --git a/Build/toolchain/nuclei_llvm.mk b/Build/toolchain/nuclei_llvm.mk index fe376701..76766b31 100644 --- a/Build/toolchain/nuclei_llvm.mk +++ b/Build/toolchain/nuclei_llvm.mk @@ -93,6 +93,8 @@ endif COMMON_FLAGS += -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=$(RISCV_CMODEL) # Enable some experimental extension for llvm clang COMMON_FLAGS += -menable-experimental-extensions +# Add zicsr extension to clang, since our cpu always has zicsr extension +COMMON_FLAGS += -Xclang -target-feature -Xclang +zicsr ## Append mtune options when RISCV_TUNE is defined ## It might be defined in SoC//build.mk, and can be overwritten by make ifneq ($(RISCV_TUNE),)