aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets/fe310.json
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-11-01 19:11:04 +0100
committerRon Evans <[email protected]>2021-11-03 23:03:44 +0100
commit29206cf0a4a8efcdabe50306090fe6125f6b2d0c (patch)
tree2df5e3376a0a8b026d6f819f35e2a80880c7b039 /targets/fe310.json
parentc2165f74d81a2ed1b1649e710b73f1c613a54185 (diff)
downloadtinygo-29206cf0a4a8efcdabe50306090fe6125f6b2d0c.tar.gz
tinygo-29206cf0a4a8efcdabe50306090fe6125f6b2d0c.zip
targets: add CPU property everywhere
This is for consistency with Clang, which always adds a CPU flag even if it's not specified in CFLAGS. This commit also adds some tests to make sure the Clang target-cpu matches the CPU property in the JSON files. This does have an effect on the generated binaries. The effect is very small though: on average just 0.2% increase in binary size, apparently because Cortex-M3 and Cortex-M4 are compiled a bit differently. However, when rebased on top of https://github.com/tinygo-org/tinygo/pull/2218 (minsize), the difference drops to -0.1% (a slight decrease on average).
Diffstat (limited to 'targets/fe310.json')
-rw-r--r--targets/fe310.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/targets/fe310.json b/targets/fe310.json
index 76f749705..c513a39f1 100644
--- a/targets/fe310.json
+++ b/targets/fe310.json
@@ -1,5 +1,6 @@
{
"inherits": ["riscv32"],
+ "cpu": "sifive-e31",
"features": ["+a", "+c", "+m"],
"build-tags": ["fe310", "sifive"]
}