diff --git a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/CommandLine.kt b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/CommandLine.kt index dd59c807af0..72d37ea3045 100644 --- a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/CommandLine.kt +++ b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/CommandLine.kt @@ -61,6 +61,8 @@ open class CommonInteropArguments(val argParser: ArgParser) { description = "don't link unused libraries even explicitly specified").default(false) val tempDir by argParser.option(ArgType.String, TEMP_DIR, description = "save temporary files to the given directory") + val kotlincOption by argParser.option(ArgType.String, "Xkotlinc-option", + description = "additional kotlinc compiler option").multiple() companion object { const val MODE_SOURCECODE = "sourcecode" diff --git a/utilities/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/InteropCompiler.kt b/utilities/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/InteropCompiler.kt index 94112b867ac..2b620de6dff 100644 --- a/utilities/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/InteropCompiler.kt +++ b/utilities/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/InteropCompiler.kt @@ -67,7 +67,8 @@ fun invokeInterop(flavor: String, args: Array): Array? { repos.flatMap { listOf("-repo", it) } + (if (noDefaultLibs) arrayOf("-$NODEFAULTLIBS") else emptyArray()) + (if (noEndorsedLibs) arrayOf("-$NOENDORSEDLIBS") else emptyArray()) + - (if (purgeUserLibs) arrayOf("-$PURGE_USER_LIBS") else emptyArray()) + (if (purgeUserLibs) arrayOf("-$PURGE_USER_LIBS") else emptyArray()) + + arguments.kotlincOption }