aboutsummaryrefslogtreecommitdiffhomepage
path: root/compileopts/target.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-10-12 22:05:38 +0000
committerRon Evans <[email protected]>2022-10-19 22:23:19 +0200
commit0ddcf4af96a9bf89d27678531c8215981f90807d (patch)
tree0e122ea614364177d18892abbe79b9b991c65820 /compileopts/target.go
parentd435fc868b9caef76b7a9b30a9c33adc3a79cab4 (diff)
downloadtinygo-0ddcf4af96a9bf89d27678531c8215981f90807d.tar.gz
tinygo-0ddcf4af96a9bf89d27678531c8215981f90807d.zip
riscv: add "target-abi" metadata flag
This flag is necessary in LLVM 15 because it appears that LLVM 15 has changed the default target ABI from lp64 to lp64d. This results in a linker failure. Setting the "target-abi" forces the RISC-V backend to use the intended target ABI.
Diffstat (limited to 'compileopts/target.go')
-rw-r--r--compileopts/target.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/compileopts/target.go b/compileopts/target.go
index 1b5578eaf..95e684b2e 100644
--- a/compileopts/target.go
+++ b/compileopts/target.go
@@ -26,6 +26,7 @@ type TargetSpec struct {
Inherits []string `json:"inherits"`
Triple string `json:"llvm-target"`
CPU string `json:"cpu"`
+ ABI string `json:"target-abi"` // rougly equivalent to -mabi= flag
Features string `json:"features"`
GOOS string `json:"goos"`
GOARCH string `json:"goarch"`