Merge pull request #1308 from visualfc/cabi_riscv

internal/cabi: support risc-v specific target-abi
This commit is contained in:
xushiwei
2025-09-26 16:30:43 +08:00
committed by GitHub
157 changed files with 109217 additions and 2330 deletions

View File

@@ -34,6 +34,8 @@ type Export struct {
ClangRoot string // Root directory of custom clang installation
ClangBinPath string // Path to clang binary directory
LLVMTarget string // LLVM Target
TargetABI string // RISC-V Target ABI (e.g., "lp64", "lp64d")
BinaryFormat string // Binary format (e.g., "elf", "esp", "uf2")
FormatDetail string // For uf2, it's uf2FamilyID
Emulator string // Emulator command template (e.g., "qemu-system-arm -M {} -kernel {}")
@@ -453,6 +455,8 @@ func UseTarget(targetName string) (export Export, err error) {
export.GOOS = config.GOOS
export.GOARCH = config.GOARCH
export.ExtraFiles = config.ExtraFiles
export.LLVMTarget = config.LLVMTarget
export.TargetABI = config.TargetABI
export.BinaryFormat = config.BinaryFormat
export.FormatDetail = config.FormatDetail()
export.Emulator = config.Emulator