From dcd773ece565c64884c1b251ad64b3899d3f56b6 Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Mon, 13 May 2019 12:27:24 +0300 Subject: [PATCH] Don't omit Objective-C default library linking if category method used --- .../jetbrains/kotlin/backend/konan/lower/InteropLowering.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt index 0f831d3eb48..c184545b38e 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt @@ -639,6 +639,11 @@ internal class InteropLoweringPart1(val context: Context) : BaseInteropIrTransfo call: IrFunctionAccessExpression, method: IrSimpleFunction ): IrExpression = generateWithStubs(call) { + if (method.parent !is IrClass) { + // Category-provided. + this@InteropLoweringPart1.context.llvmImports.add(method.llvmSymbolOrigin) + } + this.generateObjCCall( this@genLoweredObjCMethodCall, method,