diff options
author | Ayke van Laethem <[email protected]> | 2021-09-22 00:26:53 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-09-28 18:44:11 +0200 |
commit | bf9dab36f757eafbf5858784d14e4c0e96fbca9d (patch) | |
tree | 9825c5e97909610957509ea34af6f0f6fa5d2cb4 /targets/xtensa.json | |
parent | 6234bf9a88e26636f8867ff71ca986be952ea780 (diff) | |
download | tinygo-bf9dab36f757eafbf5858784d14e4c0e96fbca9d.tar.gz tinygo-bf9dab36f757eafbf5858784d14e4c0e96fbca9d.zip |
build: normalize target triples to match Clang
This commit changes a target triple like "armv6m-none-eabi" to
"armv6m-unknown-unknow-eabi". The reason is that while the former is
correctly parsed in Clang (due to normalization), it wasn't parsed
correctly in LLVM meaning that the environment wasn't set to EABI.
This change normalizes all target triples and uses the EABI environment
(-eabi in the triple) for Cortex-M targets.
This change also drops the `--target=` flag in the target JSON files,
the flag is now added implicitly in `(*compileopts.Config).CFlags()`.
This removes some duplication in target JSON files.
Unfortunately, this change also increases code size for Cortex-M
targets. It looks like LLVM now emits calls like __aeabi_memmove instead
of memmove, which pull in slightly more code (they basically just call
the regular C functions) and the calls themself don't seem to be as
efficient as they could be. Perhaps this is a LLVM bug that will be
fixed in the future, as this is a very common occurrence.
Diffstat (limited to 'targets/xtensa.json')
-rw-r--r-- | targets/xtensa.json | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/targets/xtensa.json b/targets/xtensa.json index 7fa24f5bd..32ac133f5 100644 --- a/targets/xtensa.json +++ b/targets/xtensa.json @@ -6,7 +6,6 @@ "gc": "conservative", "scheduler": "none", "cflags": [ - "--target=xtensa", "-Werror", "-fshort-enums", "-Wno-macro-redefined", |