Added option to add compiler options for kotlinc compiler call in cin… (#3906)

This commit is contained in:
LepilkinaElena
2020-02-25 18:16:55 +03:00
committed by GitHub
parent 7f49eae401
commit a477233b04
2 changed files with 4 additions and 1 deletions
@@ -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"
@@ -67,7 +67,8 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String>? {
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
}