diff options
| author | Sam Elliott <selliott@lowrisc.org> | 2019-06-21 10:03:31 +0000 |
|---|---|---|
| committer | Sam Elliott <selliott@lowrisc.org> | 2019-06-21 10:03:31 +0000 |
| commit | 3e53e0e4d48d405890f40777b4be5bd49cfac121 (patch) | |
| tree | 3d71f3dcfaaf1007d64f7332dfd793b071a4e68a /clang/lib/Sema/SemaInit.cpp | |
| parent | 4f7d3e90974a0c778434c3eb893fe251f5a6b4a4 (diff) | |
| download | bcm5719-llvm-3e53e0e4d48d405890f40777b4be5bd49cfac121.tar.gz bcm5719-llvm-3e53e0e4d48d405890f40777b4be5bd49cfac121.zip | |
[RISC-V] Add -msave-restore and -mno-save-restore to clang driver
Summary:
The GCC RISC-V toolchain accepts `-msave-restore` and `-mno-save-restore`
to control whether libcalls are used for saving and restoring the stack within
prologues and epilogues.
Clang currently errors if someone passes -msave-restore or -mno-save-restore.
This means that people need to change build configurations to use clang. This
patch adds these flags, so that clang invocations can now match gcc.
As the RISC-V backend does not currently have a `save-restore` target feature,
we emit a warning if someone requests `-msave-restore`. LLVM does not error if
we pass the (unimplemented) target features `+save-restore` or `-save-restore`.
Reviewers: asb, luismarques
Reviewed By: asb
Subscribers: rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63498
llvm-svn: 364018
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
0 files changed, 0 insertions, 0 deletions

