But, the size of the package in the Arduino15 directory which is created by the command arduino-cli core install arduino:avr is almost 270MB. Especially, Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 is the biggest size, almost 235MB. It's too big for the my custom release. It's too big! I am planning to release my custom program including this toolchain(CLI+core platform). How can I dramatically reduce it only for Uno and Nano?
Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 is the biggest by far. This contains support for every AVR microcontroller, but you only need the ATmega328P support for the Uno, so it's likely you could remove some files. I don't know exactly what though. I'm sure one of the other forum members will be able to provide assistance with that.