Are there any tips I can use to further reduce bin...
# kotlin-native
Are there any tips I can use to further reduce binary size? My release build is 4.3 mb and using the
command on it shrinks it to 3.1 mb.
Assuming you are using Gradle there would be a task for generating a release binary, which creates a binary with all the debug symbols stripped out.
How can the strip tool work with a Kotlin Native project when it doesn't have any object files it can use? The Kotlin Native compiler (konan) doesn't generate any object files.
As an example I have a debug binary of a Kotlin Native program (Conduit Server - ) that is 13.6 MB in size. With the release binary it is 4.6 MB in size. Average size delta between the two binaries is around 65%. In the binaries some of the libraries are statically linked like Ktor Server for example.
Well for me using the strip tool on the release binary reduced it by 1.2 MB
This is in my definition file
Copy code
headers = X11/Xlib.h X11/Xutil.h X11/Xft/Xft.h X11/cursorfont.h
headerFilter = X11/**
compilerOpts = -I/usr/include -I/usr/include/x86_64-linux-gnu -I/usr/include/freetype2
linkerOpts = -L/usr/lib -L/usr/lib/x86_64-linux-gnu -lX11 -lXft
Which arguments did you use with the strip tool?