[PATCH] D144853: [Clang][RISCV] Add CMake options to configure default CPU
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 27 21:15:39 PST 2023
craig.topper added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:324
- return Triple.isRISCV64() ? "generic-rv64" : "generic-rv32";
+ std::string DefaultCPU = Triple.isRISCV64() ? CLANG_RISCV64_DEFAULT_CPU
+ : CLANG_RISCV32_DEFAULT_CPU;
----------------
Can we initialize `CPU` to the default CPU at the top? Remove the `CPU.empty()` check. Then we don't need a second `"native"` check.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144853/new/
https://reviews.llvm.org/D144853
More information about the cfe-commits
mailing list