https://kotlinlang.org logo
Title
j

Jorrit

12/30/2017, 5:14 PM
Why do Kotlin/Native produced binaries depend on libstdc++ ?
o

olonho

12/30/2017, 7:25 PM
What platform are you talking about?
j

Jorrit

01/01/2018, 9:45 AM
Tested on mingw... I had assumed the same is the case for other platforms?
To clarify, it links it statically. Unless you change some things around in konan.properties, then it becomes a dynamic dependency. Stripping it out almost halves the file size. Admittedly I know very little about compilers, I'm just curious why it is needed.
o

olonho

01/01/2018, 2:15 PM
Mingw runtime is linked into the binary (as it is not available on all target machines). Typical binary size on most other platforms is smaller. Parts of C++ runtime are needed for exception handling, as K/N currently uses C++ personality function.