update 64bit target flags (#113)

This commit is contained in:
Cyrill Leutwiler
2024-11-14 16:29:21 +07:00
committed by GitHub
parent 4cce4a729e
commit f947984671
4 changed files with 41 additions and 10 deletions
+6 -2
View File
@@ -11,9 +11,9 @@ const TARGET_FLAG: &str = "--target=riscv32";
const TARGET_FLAG: &str = "--target=riscv64";
#[cfg(not(feature = "riscv-64"))]
const TARGET_ARCH_FLAG: &str = "-march=rv32em";
const TARGET_ARCH_FLAG: &str = "-march=rv32emac";
#[cfg(feature = "riscv-64")]
const TARGET_ARCH_FLAG: &str = "-march=rv64em";
const TARGET_ARCH_FLAG: &str = "-march=rv64emac";
#[cfg(not(feature = "riscv-64"))]
const TARGET_ABI_FLAG: &str = "-mabi=ilp32e";
@@ -36,6 +36,10 @@ fn compile(source_path: &str, bitcode_path: &str) {
TARGET_TRIPLE_FLAG,
TARGET_ARCH_FLAG,
TARGET_ABI_FLAG,
"-Xclang",
"-target-feature",
"-Xclang",
"+fast-unaligned-access,+xtheadcondmov",
"-fno-exceptions",
"-ffreestanding",
"-Wall",