Allow specifying key "llvm-abiname" in target specification
This addresses #65024, as it allows RISC-V target specification files to set "llvm-abiname": "lp64d". In general, it is useful for the programmer to be able to set this codegen parameter, which other languages usually expose under a compiler argument like "-mabi=<XYZ>".
This commit is contained in:
parent
aa69777ea2
commit
539de439ad
4 changed files with 12 additions and 3 deletions
|
@ -343,7 +343,7 @@ extern "C" const char* LLVMRustGetHostCPUName(size_t *len) {
|
|||
|
||||
extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
|
||||
const char *TripleStr, const char *CPU, const char *Feature,
|
||||
LLVMRustCodeModel RustCM, LLVMRustRelocMode RustReloc,
|
||||
const char *ABIStr, LLVMRustCodeModel RustCM, LLVMRustRelocMode RustReloc,
|
||||
LLVMRustCodeGenOptLevel RustOptLevel, bool UseSoftFloat,
|
||||
bool PositionIndependentExecutable, bool FunctionSections,
|
||||
bool DataSections,
|
||||
|
@ -374,6 +374,7 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
|
|||
Options.FunctionSections = FunctionSections;
|
||||
Options.MCOptions.AsmVerbose = AsmComments;
|
||||
Options.MCOptions.PreserveAsmComments = AsmComments;
|
||||
Options.MCOptions.ABIName = ABIStr;
|
||||
|
||||
if (TrapUnreachable) {
|
||||
// Tell LLVM to codegen `unreachable` into an explicit trap instruction.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue