diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt index 09d9ca52924..9c85e5ffded 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt @@ -486,6 +486,7 @@ private fun ObjCExportCodeGenerator.replaceExternalWeakOrCommonGlobal( // Note: actually this is required only if global's weak/common definition is in another object file, // but it is simpler to do this for all globals, considering that all usages can't be removed by DCE anyway. context.llvm.usedGlobals += global.llvmGlobal + LLVMSetVisibility(global.llvmGlobal, LLVMVisibility.LLVMHiddenVisibility) } } }