Interop: Support setting custom unique name for interop libs

This commit is contained in:
Ilya Matveev
2020-03-27 16:45:29 +07:00
committed by Ilya Matveev
parent ce1cb39c41
commit ffe8ce5524
3 changed files with 9 additions and 1 deletions
@@ -26,6 +26,7 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String>? {
val purgeUserLibs = arguments.purgeUserLibs
val nopack = arguments.nopack
val temporaryFilesDir = arguments.tempDir
val moduleName = (arguments as? CInteropArguments)?.moduleName
val shortModuleName = (arguments as? CInteropArguments)?.shortModuleName
val buildDir = File("$outputFileName-build")
@@ -67,6 +68,7 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String>? {
(if (noEndorsedLibs) arrayOf("-$NOENDORSEDLIBS") else emptyArray()) +
(if (purgeUserLibs) arrayOf("-$PURGE_USER_LIBS") else emptyArray()) +
(if (nopack) arrayOf("-$NOPACK") else emptyArray()) +
moduleName?.let { arrayOf("-module-name", it) }.orEmpty() +
shortModuleName?.let { arrayOf("-Xshort-module-name=$it") }.orEmpty() +
arguments.kotlincOption
}