realm-kotlin
                                
                                 realm-kotlin copied to clipboard
                                
                                    realm-kotlin copied to clipboard
                            
                            
                            
                        [RKOTLIN-877] Avoid exporting Core's symbols to allow mixing multiple SDKs
The cinterop KLIB includes compiled core's static libraries that will be used by the linker to build the final app. This PR will avoid exporting Core's symbols so if the user adds another SDK like Swift to their app then build/link statically the Swift app the two versions of Core will not conflicts
Most of the work was testing with MultiplatformDemo and MultiplatformDemoWithSync while adding a POD dependency to Swift SDK and using two Realms using two version of Core inside the same iOS app.
when building such app the dynamic framweork build from Kotlin/Native should not include any Core symbols like the following:
xcrun dyldinfo  ../shared/build/bin/ios/podDebugFramework/shared.framework/shared -weak_bind  | c++filt
weak binding information:
segment section          address       type     addend symbol
__DATA  __la_symbol_ptr  0x00A3C168    pointer       0 _Konan_DebugBuffer
__DATA  __la_symbol_ptr  0x00A3C170    pointer       0 _Konan_DebugBufferSize
__DATA  __la_symbol_ptr  0x00A3C178    pointer       0 _Konan_DebugObjectToUtf8Array
__DATA_CONST __got            0x0090C1C0    pointer       0 typeinfo for std::length_error
__DATA_CONST __got            0x0090C1C8    pointer       0 typeinfo for std::out_of_range
__DATA_CONST __got            0x0090C1D8    pointer       0 typeinfo for std::overflow_error
__DATA_CONST __const          0x009FB878    pointer       0 typeinfo for std::overflow_error
__DATA_CONST __got            0x0090C1E0    pointer       0 typeinfo for std::invalid_argument
__DATA_CONST __const          0x00A0FCC0    pointer       0 typeinfo for std::invalid_argument
__DATA  __la_symbol_ptr  0x00A3C700    pointer       0 operator delete[](void*)
__DATA  __la_symbol_ptr  0x00A3C708    pointer       0 operator delete(void*)
__DATA  __la_symbol_ptr  0x00A3C710    pointer       0 operator new[](unsigned long)
__DATA  __la_symbol_ptr  0x00A3C718    pointer       0 operator new(unsigned long)
__DATA  __la_symbol_ptr  0x00A3C720    pointer       0 operator new(unsigned long, std::nothrow_t const&)