Forward ABIName to MCTargetOptions
This is required on RISC-V where Linux uses the lp64d ABI that allows the usage of floating point registers to pass arguments. It seems to work out-of-the-box upstream in clang-repl which passes through the function initTargetOptions in clang/lib/CodeGen/BackendUtil.cpp with the same effect.
This commit is contained in:
parent
eb82dc505a
commit
8c3b18f683
@ -435,6 +435,7 @@ CreateTargetMachine(const clang::CompilerInstance& CI, bool JITLink) {
|
||||
using namespace llvm::orc;
|
||||
auto JTMB = JITTargetMachineBuilder(TT);
|
||||
JTMB.addFeatures(CI.getTargetOpts().Features);
|
||||
JTMB.getOptions().MCOptions.ABIName = CI.getTarget().getABI().str();
|
||||
|
||||
JTMB.setCodeGenOptLevel(OptLevel);
|
||||
#ifdef _WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user