aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets/microbit.json
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2018-11-09 11:19:54 +0100
committerAyke van Laethem <[email protected]>2018-11-09 11:50:38 +0100
commit611bca39ab6c083c6671af5b06f9b5742c829b69 (patch)
tree755556f1bd46e6b0712ea7e4b58ca7863ccb64fc /targets/microbit.json
parentb1cf69a523c81320b36392a16ef9f08ad0e004bc (diff)
downloadtinygo-611bca39ab6c083c6671af5b06f9b5742c829b69.tar.gz
tinygo-611bca39ab6c083c6671af5b06f9b5742c829b69.zip
all: rename 'arm' to 'tinygo.arm' for Cortex-M
Let the standard library think that it is compiling for js/wasm. The most correct way of supporting bare metal Cortex-M targets would be using the 'arm' build tag and specifying no OS or an 'undefined' OS (perhaps GOOS=noos?). However, there is no build tag for specifying no OS at all, the closest possible is GOOS=js which makes very few assumptions. Sadly GOOS=js also makes some assumptions: it assumes to be running with GOARCH=wasm. This would not be such a problem, just add js, wasm and arm as build tags. However, having two GOARCH build tags leads to an error in internal/cpu: it defines variables for both architectures which then conflict. To work around these problems, the 'arm' target has been renamed to 'tinygo.arm', which should work around these problems. In the future, a GOOS=noos (or similar) should be added which can work with any architecture and doesn't implement OS-specific stuff.
Diffstat (limited to 'targets/microbit.json')
-rw-r--r--targets/microbit.json2
1 files changed, 1 insertions, 1 deletions
diff --git a/targets/microbit.json b/targets/microbit.json
index de932934a..810b2dc02 100644
--- a/targets/microbit.json
+++ b/targets/microbit.json
@@ -1,6 +1,6 @@
{
"llvm-target": "armv6m-none-eabi",
- "build-tags": ["microbit", "nrf51822", "nrf51", "nrf", "arm", "js", "wasm"],
+ "build-tags": ["microbit", "nrf51822", "nrf51", "nrf", "tinygo.arm", "js", "wasm"],
"linker": "arm-none-eabi-gcc",
"compiler-rt": true,
"pre-link-args": [