Dmitry Kandalov
09/27/2018, 8:33 AMDmitry Kandalov
09/27/2018, 8:34 AMkonanc -opt
flag it’s even bigger.Dmitry Kandalov
09/27/2018, 8:37 AMstrings program.kexe
shows paths to teamcity agent /opt/teamcity-agent/work/...
thevery
09/27/2018, 8:54 AMDeactivated User
09/27/2018, 9:01 AMstrip program.kexe
?
That would cut 100~300kb a from hello world release/debug builds. Also you usually distribute things compressed. After a release build for macos + strip, a 7z file with the binary is ~142kb. You can also use UPX to get similar results (189kb) in the final exe:
upx program.kexe
Dmitry Kandalov
09/27/2018, 9:33 AMDmitry Kandalov
09/27/2018, 9:40 AMDeactivated User
09/27/2018, 10:00 AM__FILE__
macro for debugging purposes somehow and includes those strings since the stdlib was built using teamcity. You can compile your own kotlin-native in a shorter path and use it 🙂
But yeah, think that it is not even 1.0, so no much attention on that kind of optimizations has been done yet. Before 1.0 usually the idea is to get it right.
My bet is that the size is related to some runtime stuff still not being optimized/stripped because a lack of other optimizations.