diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -406,7 +406,13 @@ return StringSwitch(UArch) .Case("sifive,u74-mc", "sifive-u74") .Case("sifive,bullet0", "sifive-u74") +#if __riscv_xlen == 64 + .Default("generic-rv64"); +#elif __riscv_xlen == 32 + .Default("generic-rv32"); +#else .Default("generic"); +#endif } StringRef sys::detail::getHostCPUNameForBPF() {