[Gradle, JS] whole-program not produce compiler argument
This commit is contained in:
committed by
Space Team
parent
2727163a63
commit
a1a046d164
+2
-2
@@ -17,10 +17,10 @@ enum class KotlinJsIrOutputGranularity {
|
||||
}
|
||||
}
|
||||
|
||||
fun KotlinJsIrOutputGranularity.toCompilerArgument(): String {
|
||||
fun KotlinJsIrOutputGranularity.toCompilerArgument(): String? {
|
||||
return when (this) {
|
||||
KotlinJsIrOutputGranularity.PER_FILE -> PER_FILE
|
||||
KotlinJsIrOutputGranularity.PER_MODULE -> PER_MODULE
|
||||
KotlinJsIrOutputGranularity.WHOLE_PROGRAM -> ""
|
||||
KotlinJsIrOutputGranularity.WHOLE_PROGRAM -> null
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -77,7 +77,9 @@ internal open class KotlinJsIrLinkConfig(
|
||||
|
||||
val alreadyDefinedOutputMode = any { it.startsWith(PER_MODULE) }
|
||||
if (!alreadyDefinedOutputMode) {
|
||||
add(task.outputGranularity.toCompilerArgument())
|
||||
task.outputGranularity.toCompilerArgument()?.let {
|
||||
add(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user