aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets/riscv.json
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-11-06 15:29:54 +0100
committerRon Evans <[email protected]>2021-11-07 09:26:46 +0100
commit78fec3719f73e75b5f8ba8e13de0a4f61499e557 (patch)
tree33a8091b4f351bd57a127c37c482f2db6ed6e730 /targets/riscv.json
parentaf4d0fe191f22a4169bff2fff721ef20a1884bd2 (diff)
downloadtinygo-78fec3719f73e75b5f8ba8e13de0a4f61499e557.tar.gz
tinygo-78fec3719f73e75b5f8ba8e13de0a4f61499e557.zip
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.
Diffstat (limited to 'targets/riscv.json')
-rw-r--r--targets/riscv.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/targets/riscv.json b/targets/riscv.json
index 4fe9af50b..8d9dbb265 100644
--- a/targets/riscv.json
+++ b/targets/riscv.json
@@ -8,6 +8,7 @@
"libc": "picolibc",
"cflags": [
"-Werror",
+ "-mno-relax",
"-fno-exceptions", "-fno-unwind-tables",
"-ffunction-sections", "-fdata-sections"
],