From 53550c5954e5326f3534a55aa1ddd12cd7aa13ce Mon Sep 17 00:00:00 2001 From: Nikolay Igotti Date: Fri, 10 Aug 2018 09:39:49 +0300 Subject: [PATCH] Fix .def file generation. --- .../src/org/jetbrains/kotlin/backend/konan/CAdapterGenerator.kt | 2 +- .../src/org/jetbrains/kotlin/backend/konan/OutputFiles.kt | 1 + shared/src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/CAdapterGenerator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/CAdapterGenerator.kt index dd2a1d60d5d..48b15b4f06c 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/CAdapterGenerator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/CAdapterGenerator.kt @@ -870,7 +870,7 @@ internal class CAdapterGenerator( outputStreamWriter.close() if (context.config.target.family == Family.MINGW) { - outputStreamWriter = context.config.tempFiles + outputStreamWriter = context.config.outputFiles .cAdapterDef .printWriter() output("EXPORTS") diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/OutputFiles.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/OutputFiles.kt index b12737c160c..920640f85a7 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/OutputFiles.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/OutputFiles.kt @@ -38,6 +38,7 @@ class OutputFiles(outputPath: String?, target: KonanTarget, produce: CompilerOut * Header file for dynamic library */ val cAdapterHeader by lazy { File("${outputName}_api.h") } + val cAdapterDef by lazy { File("${outputName}_symbols.def") } /** * Main compiler's output file diff --git a/shared/src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt b/shared/src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt index 6171c835bbd..5054d7131c5 100644 --- a/shared/src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt +++ b/shared/src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt @@ -26,7 +26,6 @@ class TempFiles(outputPath: String, pathToTemporaryDir: String? = null) { private val outputName = File(outputPath).name val nativeBinaryFile by lazy { File(dir,"${outputName}.kt.bc") } - val cAdapterDef by lazy { File(dir,"${outputName}_symbols.def") } val cAdapterCpp by lazy { File(dir, "api.cpp") } val cAdapterBitcode by lazy { File(dir, "api.bc") }