[PATCH] D144853: [Clang][RISCV] Add CMake options to configure default CPU

2023-02-28 Thread Wang Pengcheng via Phabricator via cfe-commits
pcwang-thead abandoned this revision. pcwang-thead added a comment. In D144853#4157629 , @MaskRay wrote: > I object to this change which further complicates the build system and makes > the difference difficult to observe by users. > If your `clang` exec

[PATCH] D144853: [Clang][RISCV] Add CMake options to configure default CPU

2023-02-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I object to this change which further complicates the build system and makes the difference difficult to observe by users. If your `clang` executable is at `bin/clang`, just create `bin/riscv64-unknown-linux-gnu.cfg` with `-mcpu=xxx`. You may configure `LLVM_DEFAULT_TARG

[PATCH] D144853: [Clang][RISCV] Add CMake options to configure default CPU

2023-02-27 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Would this make more sense in a config file rather than a CMake option? @MaskRay Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144853/new/ https://reviews.llvm.org/D144853 ___

[PATCH] D144853: [Clang][RISCV] Add CMake options to configure default CPU

2023-02-27 Thread Wang Pengcheng via Phabricator via cfe-commits
pcwang-thead added a comment. In D144853#4155482 , @asb wrote: > If this is a useful thing to have, would it make more sense as a > target-independent option? Yes, I agree. I need to do some researches here to figure out if all targets have the same b

[PATCH] D144853: [Clang][RISCV] Add CMake options to configure default CPU

2023-02-27 Thread Wang Pengcheng via Phabricator via cfe-commits
pcwang-thead updated this revision to Diff 501035. pcwang-thead added a comment. Simplify code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144853/new/ https://reviews.llvm.org/D144853 Files: clang/CMakeLists.txt clang/include/clang/Config/c

[PATCH] D144853: [Clang][RISCV] Add CMake options to configure default CPU

2023-02-27 Thread Craig Topper via Phabricator via cfe-commits
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 +

[PATCH] D144853: [Clang][RISCV] Add CMake options to configure default CPU

2023-02-27 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. If this is a useful thing to have, would it make more sense as a target-independent option? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144853/new/ https://reviews.llvm.org/D144853 __

[PATCH] D144853: [Clang][RISCV] Add CMake options to configure default CPU

2023-02-27 Thread Wang Pengcheng via Phabricator via cfe-commits
pcwang-thead created this revision. pcwang-thead added reviewers: asb, jrtc27, kito-cheng, craig.topper, reames, eopXD. Herald added subscribers: luke, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, Mar