tinygo/cgo
Ayke van Laethem bf9dab36f7 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.
2021-09-28 18:44:11 +02:00
..
testdata cgo: don't normalize CGo tests anymore 2021-09-09 13:28:50 +02:00
cgo.go all: fix staticcheck warnings 2021-09-27 15:47:12 +02:00
cgo_test.go build: normalize target triples to match Clang 2021-09-28 18:44:11 +02:00
const.go cgo: implement prefix parsing 2021-05-21 17:54:13 +02:00
const_test.go cgo: implement prefix parsing 2021-05-21 17:54:13 +02:00
libclang.go all: fix staticcheck warnings 2021-09-27 15:47:12 +02:00
libclang_config.go all: remove support for LLVM 9 2021-03-04 15:46:05 +01:00
libclang_config_llvm10.go main: use LLVM 11 by default when linking LLVM dynamically 2021-01-19 08:55:57 +01:00
libclang_stubs.c main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
security.go cgo: implement #cgo CFLAGS 2019-11-25 09:32:03 +01:00
security_test.go cgo: implement #cgo CFLAGS 2019-11-25 09:32:03 +01:00
sync.go cgo: refactor; support multiple cgo files in a single package 2019-05-12 10:49:15 +02:00