diff options
author | Ayke van Laethem <[email protected]> | 2021-12-09 02:52:08 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-01-09 11:04:10 +0100 |
commit | ebd4969cde351cdc31eb142f14dd4c1ce1352de1 (patch) | |
tree | 1e15d66126a03d1d5183b6d94f03c0b5608c9913 /compileopts/target.go | |
parent | 32a7b8cc4e78799c6447064b9f5576c7f16c4f88 (diff) | |
download | tinygo-ebd4969cde351cdc31eb142f14dd4c1ce1352de1.tar.gz tinygo-ebd4969cde351cdc31eb142f14dd4c1ce1352de1.zip |
all: switch to LLVM 13
This adds support for building with `-tags=llvm13` and switches to LLVM
13 for tinygo binaries that are statically linked against LLVM.
Some notes on this commit:
* Added `-mfloat-abi=soft` to all Cortex-M targets because otherwise
nrfx would complain that floating point was enabled on Cortex-M0.
That's not the case, but with `-mfloat-abi=soft` the `__SOFTFP__`
macro is defined which silences this warning.
See: https://reviews.llvm.org/D100372
* Changed from `--sysroot=<root>` to `-nostdlib -isystem <root>` for
musl because with Clang 13, even with `--sysroot` some system
libraries are used which we don't want.
* Changed all `-Xclang -internal-isystem -Xclang` to simply
`-isystem`, for consistency with the above change. It appears to
have the same effect.
* Moved WebAssembly function declarations to the top of the file in
task_asyncify_wasm.S because (apparently) the assembler has become
more strict.
Diffstat (limited to 'compileopts/target.go')
-rw-r--r-- | compileopts/target.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compileopts/target.go b/compileopts/target.go index 3df128a40..b872ac87d 100644 --- a/compileopts/target.go +++ b/compileopts/target.go @@ -267,11 +267,11 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { spec.CPU = "generic" switch strings.Split(triple, "-")[0] { case "armv5": - spec.Features = "+armv5t,+strict-align,-thumb-mode" + 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" case "armv6": - spec.Features = "+armv6,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-thumb-mode" + spec.Features = "+armv6,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" case "armv7": - spec.Features = "+armv7-a,+d32,+dsp,+fp64,+neon,+vfp2,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,-thumb-mode" + spec.Features = "+armv7-a,+d32,+dsp,+fp64,+neon,+vfp2,+vfp2sp,+vfp3,+vfp3d16,+vfp3d16sp,+vfp3sp,-aes,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-sha2,-thumb-mode,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" } case "arm64": spec.CPU = "generic" |