aboutsummaryrefslogtreecommitdiffhomepage
path: root/compileopts/target.go
diff options
context:
space:
mode:
authorElliott Sales de Andrade <[email protected]>2022-01-03 18:40:21 -0500
committerRon Evans <[email protected]>2022-01-14 07:34:36 +0100
commitb2ef7299b753db052322f582954c123cc7a552e2 (patch)
tree7a9d2c8744031af7b4187f31a9d4572f4cf816cf /compileopts/target.go
parent14ce531498cf8b936dd159cb4875ff3d8ea6094b (diff)
downloadtinygo-b2ef7299b753db052322f582954c123cc7a552e2.tar.gz
tinygo-b2ef7299b753db052322f582954c123cc7a552e2.zip
arm: Explicitly disable unwind tables
Some clang builds (e.g., Fedora's) enable unwind tables by default. As tinygo does not need nor support them, that leads to undefined symbols when linking.
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 b872ac87d..9bbfcf950 100644
--- a/compileopts/target.go
+++ b/compileopts/target.go
@@ -265,6 +265,7 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
spec.Features = "+cx8,+fxsr,+mmx,+sse,+sse2,+x87"
case "arm":
spec.CPU = "generic"
+ spec.CFlags = append(spec.CFlags, "-fno-unwind-tables")
switch strings.Split(triple, "-")[0] {
case "armv5":
spec.Features = "+armv5t,+strict-align,-aes,-bf16,-d32,-dotprod,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fp64,-fpregs,-fullfp16,-mve.fp,-neon,-sha2,-thumb-mode,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp"