[llvm] [RISCV] Add basic Mach-O triple support. (PR #141682)
Jessica Clarke via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 09:51:15 PDT 2025
================
@@ -156,6 +156,9 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget() {
static StringRef computeDataLayout(const Triple &TT,
const TargetOptions &Options) {
StringRef ABIName = Options.MCOptions.getABIName();
+ if (TT.isOSBinFormatMachO())
+ return "e-m:o-p:32:32-i64:64-n32-S128";
----------------
jrtc27 wrote:
This assumes RV32, and non-ilp32e at that. Can we not parameterise all the existing cases with the mangling? Or, if they really must diverge, at least assert it's 32-bit and not ilp32e?
https://github.com/llvm/llvm-project/pull/141682
More information about the llvm-commits
mailing list