mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 23:13:40 +00:00
all: add target-features string to all targets
This makes sure that the LLVM target features match the one generated by
Clang:
- This fixes a bug introduced when setting the target CPU for all
targets: Cortex-M4 would now start using floating point operations
while they were disabled in C.
- This will make it possible in the future to inline C functions in Go
and vice versa. This will need some more work though.
There is a code size impact. Cortex-M4 targets are increased slightly in
binary size while Cortex-M0 targets tend to be reduced a little bit.
Other than that, there is little impact.
This commit is contained in:
committed by
Ron Evans
parent
af4d0fe191
commit
78fec3719f
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"inherits": ["cortex-m"],
|
||||
"llvm-target": "thumbv6m-unknown-unknown-eabi",
|
||||
"cpu": "cortex-m0"
|
||||
"cpu": "cortex-m0",
|
||||
"features": "+armv6-m,+soft-float,+strict-align,+thumb-mode,-aes,-bf16,-cdecp0,-cdecp1,-cdecp2,-cdecp3,-cdecp4,-cdecp5,-cdecp6,-cdecp7,-crc,-crypto,-d32,-dotprod,-dsp,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fp64,-fpregs,-fullfp16,-hwdiv,-hwdiv-arm,-i8mm,-lob,-mve,-mve.fp,-neon,-ras,-sb,-sha2,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"inherits": ["cortex-m"],
|
||||
"llvm-target": "thumbv6m-unknown-unknown-eabi",
|
||||
"cpu": "cortex-m0plus"
|
||||
"cpu": "cortex-m0plus",
|
||||
"features": "+armv6-m,+soft-float,+strict-align,+thumb-mode,-aes,-bf16,-cdecp0,-cdecp1,-cdecp2,-cdecp3,-cdecp4,-cdecp5,-cdecp6,-cdecp7,-crc,-crypto,-d32,-dotprod,-dsp,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fp64,-fpregs,-fullfp16,-hwdiv,-hwdiv-arm,-i8mm,-lob,-mve,-mve.fp,-neon,-ras,-sb,-sha2,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"inherits": ["cortex-m"],
|
||||
"llvm-target": "thumbv7m-unknown-unknown-eabi",
|
||||
"cpu": "cortex-m3"
|
||||
"cpu": "cortex-m3",
|
||||
"features": "+armv7-m,+hwdiv,+soft-float,+strict-align,+thumb-mode,-aes,-bf16,-cdecp0,-cdecp1,-cdecp2,-cdecp3,-cdecp4,-cdecp5,-cdecp6,-cdecp7,-crc,-crypto,-d32,-dotprod,-dsp,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fp64,-fpregs,-fullfp16,-hwdiv-arm,-i8mm,-lob,-mve,-mve.fp,-neon,-ras,-sb,-sha2,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp"
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"inherits": ["cortex-m"],
|
||||
"llvm-target": "thumbv7em-unknown-unknown-eabi",
|
||||
"cpu": "cortex-m4",
|
||||
"features": "+armv7e-m,+dsp,+hwdiv,+soft-float,+strict-align,+thumb-mode,-aes,-bf16,-cdecp0,-cdecp1,-cdecp2,-cdecp3,-cdecp4,-cdecp5,-cdecp6,-cdecp7,-crc,-crypto,-d32,-dotprod,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fp64,-fpregs,-fullfp16,-hwdiv-arm,-i8mm,-lob,-mve,-mve.fp,-neon,-ras,-sb,-sha2,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp",
|
||||
"cflags": [
|
||||
"-mfloat-abi=soft"
|
||||
]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"inherits": ["cortex-m"],
|
||||
"llvm-target": "thumbv7em-unknown-unknown-eabi",
|
||||
"cpu": "cortex-m7",
|
||||
"features": "+armv7e-m,+dsp,+hwdiv,+soft-float,+strict-align,+thumb-mode,-aes,-bf16,-cdecp0,-cdecp1,-cdecp2,-cdecp3,-cdecp4,-cdecp5,-cdecp6,-cdecp7,-crc,-crypto,-d32,-dotprod,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fp64,-fpregs,-fullfp16,-hwdiv-arm,-i8mm,-lob,-mve,-mve.fp,-neon,-ras,-sb,-sha2,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp",
|
||||
"cflags": [
|
||||
"-mfloat-abi=soft"
|
||||
]
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
{
|
||||
"inherits": ["riscv32"],
|
||||
"features": ["+c", "+m"],
|
||||
"features": "+c,+m,-relax,-save-restore",
|
||||
"build-tags": ["esp32c3", "esp"],
|
||||
"serial": "uart",
|
||||
"rtlib": "compiler-rt",
|
||||
"libc": "picolibc",
|
||||
"cflags": [
|
||||
"-march=rv32imc"
|
||||
],
|
||||
"linkerscript": "targets/esp32c3.ld",
|
||||
"extra-files": [
|
||||
"src/device/esp/esp32c3.S"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"inherits": ["riscv32"],
|
||||
"cpu": "sifive-e31",
|
||||
"features": ["+a", "+c", "+m"],
|
||||
"features": "+a,+c,+m,-64bit,-relax,-save-restore",
|
||||
"build-tags": ["fe310", "sifive"]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"llvm-target": "armv4t-unknown-unknown-eabi",
|
||||
"cpu": "arm7tdmi",
|
||||
"features": "+armv4t,+soft-float,+strict-align,-aes,-bf16,-cdecp0,-cdecp1,-cdecp2,-cdecp3,-cdecp4,-cdecp5,-cdecp6,-cdecp7,-crc,-crypto,-d32,-dotprod,-dsp,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fp64,-fpregs,-fullfp16,-hwdiv,-hwdiv-arm,-i8mm,-lob,-mve,-mve.fp,-neon,-ras,-sb,-sha2,-thumb-mode,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp",
|
||||
"build-tags": ["gameboyadvance", "arm7tdmi", "baremetal", "linux", "arm"],
|
||||
"goos": "linux",
|
||||
"goarch": "arm",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"inherits": ["riscv64"],
|
||||
"features": ["+a", "+c", "+m", "+f", "+d"],
|
||||
"features": "+a,+c,+d,+f,+m,-relax,-save-restore",
|
||||
"build-tags": ["k210", "kendryte"],
|
||||
"code-model": "medium"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"llvm-target": "aarch64",
|
||||
"cpu": "cortex-a57",
|
||||
"features": "+aes,+crc,+crypto,+fp-armv8,+neon,+sha2",
|
||||
"build-tags": ["nintendoswitch", "arm64"],
|
||||
"scheduler": "tasks",
|
||||
"goos": "linux",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"inherits": ["riscv32"],
|
||||
"features": ["+a", "+c", "+m"],
|
||||
"features": "+a,+c,+m,-relax,-save-restore",
|
||||
"build-tags": ["virt", "qemu"],
|
||||
"linkerscript": "targets/riscv-qemu.ld",
|
||||
"emulator": ["qemu-system-riscv32", "-machine", "virt", "-nographic", "-bios", "none", "-kernel"]
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"libc": "picolibc",
|
||||
"cflags": [
|
||||
"-Werror",
|
||||
"-mno-relax",
|
||||
"-fno-exceptions", "-fno-unwind-tables",
|
||||
"-ffunction-sections", "-fdata-sections"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user