mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
1d7543e2bf
This commit adds support for LLVM 16 and switches to it by default. That
means three LLVM versions are supported at the same time: LLVM 14, 15,
and 16.
This commit includes work by QuLogic:
* Part of this work was based on a PR by QuLogic:
https://github.com/tinygo-org/tinygo/pull/3649
But I also had parts of this already implemented in an old branch I
already made for LLVM 16.
* QuLogic also provided a CGo fix here, which is also incorporated in
this commit:
https://github.com/tinygo-org/tinygo/pull/3869
The difference with the original PR by QuLogic is that this commit is
more complete:
* It switches to LLVM 16 by default.
* It updates some things to also make it work with a self-built LLVM.
* It fixes the CGo bug in a slightly different way, and also fixes
another one not included in the original PR.
* It does not keep compiler tests passing on older LLVM versions. I
have found this to be quite burdensome and therefore don't generally
do this - the smoke tests should hopefully catch most regressions.
36 lines
915 B
JSON
36 lines
915 B
JSON
{
|
|
"llvm-target": "aarch64",
|
|
"cpu": "cortex-a57",
|
|
"features": "+aes,+crc,+crypto,+fp-armv8,+neon,+sha2,+v8a,-fmv",
|
|
"build-tags": ["nintendoswitch", "arm64"],
|
|
"scheduler": "tasks",
|
|
"goos": "linux",
|
|
"goarch": "arm64",
|
|
"linker": "ld.lld",
|
|
"rtlib": "compiler-rt",
|
|
"libc": "picolibc",
|
|
"gc": "conservative",
|
|
"relocation-model": "pic",
|
|
"default-stack-size": 2048,
|
|
"cflags": [
|
|
"-target", "aarch64-unknown-none",
|
|
"-fPIE",
|
|
"-Werror",
|
|
"-fshort-enums",
|
|
"-fomit-frame-pointer",
|
|
"-fno-exceptions", "-fno-unwind-tables", "-fno-asynchronous-unwind-tables",
|
|
"-ffunction-sections", "-fdata-sections"
|
|
],
|
|
"ldflags": [
|
|
"-pie",
|
|
"-z", "notext"
|
|
],
|
|
"linkerscript": "targets/nintendoswitch.ld",
|
|
"extra-files": [
|
|
"targets/nintendoswitch.s",
|
|
"src/internal/task/task_stack_arm64.S",
|
|
"src/runtime/asm_arm64.S",
|
|
"src/runtime/runtime_nintendoswitch.S"
|
|
]
|
|
}
|