mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-22 05:19:03 +00:00
arm: switch to Thumb instruction set on ARM
This reduces binary size substantially, for two reasons:
- It switches to a much more architecture ARMv4 vs ARMv7.
- It switches to Thumb2, which is a lot denser than regular ARM.
Practically all modern and not-so-modern ARM chips support Thumb2, so
this seems like a safe change to me.
The size in numbers:
- Code size for testdata/stdlib.go is reduced by about 35%.
- Binary size for testdata/stdlib.go (when compiling with -no-debug to
strip debug information) is reduced by about 16%.
This commit is contained in:
committed by
Ron Evans
parent
ca4f251050
commit
37ee4bea40
@@ -172,6 +172,7 @@ func LoadTarget(target string) (*TargetSpec, error) {
|
|||||||
"386": "i386",
|
"386": "i386",
|
||||||
"amd64": "x86_64",
|
"amd64": "x86_64",
|
||||||
"arm64": "aarch64",
|
"arm64": "aarch64",
|
||||||
|
"arm": "thumbv7",
|
||||||
}[goarch]
|
}[goarch]
|
||||||
if llvmarch == "" {
|
if llvmarch == "" {
|
||||||
llvmarch = goarch
|
llvmarch = goarch
|
||||||
|
|||||||
Reference in New Issue
Block a user