[K/N] Allow running compiler with exported libs and without sources

This commit is contained in:
Ilya Matveev
2021-09-07 15:07:27 +07:00
committed by Space
parent 4ad828f80f
commit 8b52411292
3 changed files with 4 additions and 2 deletions
@@ -99,7 +99,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
val K2NativeCompilerArguments.isUsefulWithoutFreeArgs: Boolean
get() = listTargets || listPhases || checkDependencies || !includes.isNullOrEmpty() ||
!librariesToCache.isNullOrEmpty() || libraryToAddToCache != null
!librariesToCache.isNullOrEmpty() || libraryToAddToCache != null || !exportedLibraries.isNullOrEmpty()
fun Array<String>?.toNonNullList(): List<String> {
return this?.asList<String>() ?: listOf<String>()
@@ -259,6 +259,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
CHECK_DEPENDENCIES,
configuration.kotlinSourceRoots.isNotEmpty()
|| !arguments.includes.isNullOrEmpty()
|| !arguments.exportedLibraries.isNullOrEmpty()
|| outputKind.isCache
|| arguments.checkDependencies
)