Reduce code size for AVR (#116)

* all: add support for specifying target CPU in target config
* avr: specify the chip name in the target CPU

This reduces code size by a large margin. For examples/blinky, it
reduces code size from 1360 to 1266 when compiling for the Arduino Uno
(94 bytes, or ~7%).
This commit is contained in:
Ayke
2019-01-04 14:58:35 +01:00
committed by Ron Evans
parent a8dd82538e
commit 873c1c3b4d
5 changed files with 9 additions and 1 deletions
+1
View File
@@ -51,6 +51,7 @@ func Compile(pkgName, outpath string, spec *TargetSpec, config *BuildConfig, act
compilerConfig := compiler.Config{
Triple: spec.Triple,
CPU: spec.CPU,
GC: config.gc,
CFlags: spec.CFlags,
LDFlags: spec.LDFlags,