[Gradle, JS] Set compiler arg ir and produce-* unconditionally
^KT-63312 fixed
This commit is contained in:
committed by
Space Team
parent
41477b25a1
commit
342c9e8c81
-12
@@ -18,7 +18,6 @@ import org.jetbrains.kotlin.gradle.targets.js.npm.fromSrcPackageJson
|
||||
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockCopyTask.Companion.STORE_YARN_LOCK_NAME
|
||||
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockCopyTask.Companion.UPGRADE_YARN_LOCK
|
||||
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockCopyTask.Companion.YARN_LOCK_MISMATCH_MESSAGE
|
||||
import org.jetbrains.kotlin.gradle.tasks.USING_JS_IR_BACKEND_MESSAGE
|
||||
import org.jetbrains.kotlin.gradle.testbase.*
|
||||
import org.jetbrains.kotlin.gradle.testbase.TestVersions.Gradle.G_7_6
|
||||
import org.jetbrains.kotlin.gradle.util.replaceText
|
||||
@@ -40,8 +39,6 @@ class Kotlin2JsIrGradlePluginIT : KGPBaseTest() {
|
||||
fun generateDts(gradleVersion: GradleVersion) {
|
||||
project("kotlin2JsIrDtsGeneration", gradleVersion) {
|
||||
build("build") {
|
||||
checkIrCompilationMessage()
|
||||
|
||||
assertFileInProjectExists("build/js/packages/kotlin2JsIrDtsGeneration/kotlin/kotlin2JsIrDtsGeneration.js")
|
||||
val dts = projectPath.resolve("build/js/packages/kotlin2JsIrDtsGeneration/kotlin/kotlin2JsIrDtsGeneration.d.ts")
|
||||
assertFileExists(dts)
|
||||
@@ -747,17 +744,11 @@ class Kotlin2JsIrGradlePluginIT : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
|
||||
protected fun BuildResult.checkIrCompilationMessage() {
|
||||
assertOutputContains(USING_JS_IR_BACKEND_MESSAGE)
|
||||
}
|
||||
|
||||
@DisplayName("test compilation can access main compilation")
|
||||
@GradleTest
|
||||
fun testCompileTestCouldAccessProduction(gradleVersion: GradleVersion) {
|
||||
project("kotlin2JsProjectWithTests", gradleVersion) {
|
||||
build("build") {
|
||||
checkIrCompilationMessage()
|
||||
|
||||
assertTasksExecuted(
|
||||
":compileKotlinJs",
|
||||
":compileTestKotlinJs"
|
||||
@@ -774,7 +765,6 @@ class Kotlin2JsIrGradlePluginIT : KGPBaseTest() {
|
||||
fun testCompilerTestAccessInternalProduction(gradleVersion: GradleVersion) {
|
||||
project("kotlin2JsInternalTest", gradleVersion) {
|
||||
build("build") {
|
||||
checkIrCompilationMessage()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1180,8 +1170,6 @@ class Kotlin2JsIrGradlePluginIT : KGPBaseTest() {
|
||||
fun testNodeJsForkOptions(gradleVersion: GradleVersion) {
|
||||
project("kotlin-js-nodejs-custom-node-module", gradleVersion) {
|
||||
build("build") {
|
||||
checkIrCompilationMessage()
|
||||
|
||||
// It makes sense only since Tests will be run on Gradle 7.2
|
||||
assertOutputDoesNotContain("Execution optimizations have been disabled for task ':nodeTest'")
|
||||
|
||||
|
||||
+1
-15
@@ -9,7 +9,6 @@ import org.gradle.api.logging.LogLevel
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.tasks.USING_JS_INCREMENTAL_COMPILATION_MESSAGE
|
||||
import org.jetbrains.kotlin.gradle.tasks.USING_JS_IR_BACKEND_MESSAGE
|
||||
import org.jetbrains.kotlin.gradle.testbase.*
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
|
||||
@@ -36,21 +35,12 @@ abstract class AbstractKotlinJsIncrementalGradlePluginIT(
|
||||
jsOptions = defaultJsOptions,
|
||||
)
|
||||
|
||||
protected fun BuildResult.checkIrCompilationMessage() {
|
||||
if (irBackend) {
|
||||
assertOutputContains(USING_JS_IR_BACKEND_MESSAGE)
|
||||
} else {
|
||||
assertOutputDoesNotContain(USING_JS_IR_BACKEND_MESSAGE)
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("incremental compilation for js works")
|
||||
@GradleTest
|
||||
fun testIncrementalCompilation(gradleVersion: GradleVersion) {
|
||||
val buildOptions = defaultBuildOptions.copy(logLevel = LogLevel.DEBUG)
|
||||
project("kotlin2JsICProject", gradleVersion, buildOptions = buildOptions) {
|
||||
build("compileKotlinJs", "compileTestKotlinJs") {
|
||||
checkIrCompilationMessage()
|
||||
assertOutputContains(USING_JS_INCREMENTAL_COMPILATION_MESSAGE)
|
||||
assertCompiledKotlinSources(projectPath.allKotlinFiles.relativizeTo(projectPath), output)
|
||||
}
|
||||
@@ -64,7 +54,6 @@ abstract class AbstractKotlinJsIncrementalGradlePluginIT(
|
||||
it.replace("val x = 0", "val x = \"a\"")
|
||||
}
|
||||
build("compileKotlinJs", "compileTestKotlinJs") {
|
||||
checkIrCompilationMessage()
|
||||
assertOutputContains(USING_JS_INCREMENTAL_COMPILATION_MESSAGE)
|
||||
val affectedFiles = listOf("A.kt", "useAInLibMain.kt", "useAInAppMain.kt", "useAInAppTest.kt").mapNotNull {
|
||||
projectPath.findInPath(it)
|
||||
@@ -77,13 +66,10 @@ abstract class AbstractKotlinJsIncrementalGradlePluginIT(
|
||||
@DisplayName("non-incremental compilation works")
|
||||
@GradleTest
|
||||
fun testIncrementalCompilationDisabled(gradleVersion: GradleVersion) {
|
||||
val jsOptions = defaultJsOptions.run {
|
||||
if (irBackend) copy(incrementalJsKlib = false) else copy(incrementalJs = false)
|
||||
}
|
||||
val jsOptions = defaultJsOptions.copy(incrementalJsKlib = false, incrementalJs = false)
|
||||
val options = defaultBuildOptions.copy(jsOptions = jsOptions)
|
||||
project("kotlin2JsICProject", gradleVersion, buildOptions = options) {
|
||||
build("compileKotlinJs", "compileTestKotlinJs") {
|
||||
checkIrCompilationMessage()
|
||||
assertOutputDoesNotContain(USING_JS_INCREMENTAL_COMPILATION_MESSAGE)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ internal interface UsesLibraryFilterCachingService : Task {
|
||||
}
|
||||
|
||||
internal abstract class LibraryFilterCachingService : BuildService<BuildServiceParameters.None>, AutoCloseable {
|
||||
internal data class LibraryFilterCacheKey(val dependency: File, val irEnabled: Boolean, val preIrDisabled: Boolean)
|
||||
internal data class LibraryFilterCacheKey(val dependency: File)
|
||||
|
||||
private val cache = ConcurrentHashMap<LibraryFilterCacheKey, Boolean>()
|
||||
|
||||
|
||||
-5
@@ -9,16 +9,11 @@ package org.jetbrains.kotlin.gradle.targets.js.ir
|
||||
* @see [compiler/testData/cli/js/jsExtraHelp.out]
|
||||
*/
|
||||
|
||||
internal const val ENTRY_IR_MODULE = "-Xinclude"
|
||||
|
||||
internal const val DISABLE_PRE_IR = "-Xir-only"
|
||||
internal const val ENABLE_DCE = "-Xir-dce"
|
||||
|
||||
internal const val GENERATE_D_TS = "-Xgenerate-dts"
|
||||
|
||||
internal const val PRODUCE_JS = "-Xir-produce-js"
|
||||
internal const val PRODUCE_UNZIPPED_KLIB = "-Xir-produce-klib-dir"
|
||||
internal const val PRODUCE_ZIPPED_KLIB = "-Xir-produce-klib-file"
|
||||
|
||||
internal const val MINIMIZED_MEMBER_NAMES = "-Xir-minimized-member-names"
|
||||
|
||||
|
||||
+6
-3
@@ -58,7 +58,7 @@ abstract class KotlinJsIrLink @Inject constructor(
|
||||
internal val propertiesProvider = PropertiesProvider(project)
|
||||
|
||||
@get:Input
|
||||
internal val incrementalJsIr: Boolean = propertiesProvider.incrementalJsIr
|
||||
var incrementalJsIr: Boolean = propertiesProvider.incrementalJsIr
|
||||
|
||||
@get:Input
|
||||
val outputGranularity: KotlinJsIrOutputGranularity = propertiesProvider.jsIrOutputGranularity
|
||||
@@ -96,10 +96,13 @@ abstract class KotlinJsIrLink @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun contributeAdditionalCompilerArguments(context: ContributeCompilerArgumentsContext<K2JSCompilerArguments>) {
|
||||
super.contributeAdditionalCompilerArguments(context)
|
||||
override fun isIncrementalCompilationEnabled(): Boolean = false
|
||||
|
||||
override fun contributeAdditionalCompilerArguments(context: ContributeCompilerArgumentsContext<K2JSCompilerArguments>) {
|
||||
context.primitive { args ->
|
||||
args.irOnly = true
|
||||
args.irProduceJs = true
|
||||
|
||||
// moduleName can start with @ for group of NPM packages
|
||||
// but args parsing @ as start of argfile
|
||||
// so WA we provide moduleName as one parameter
|
||||
|
||||
+1
-3
@@ -464,9 +464,7 @@ constructor(
|
||||
internal override val compilerOptions: KotlinJsCompilerOptions = project.objects
|
||||
.newInstance<KotlinJsCompilerOptionsDefault>()
|
||||
.apply {
|
||||
configureJsDefaultOptions(platformType)
|
||||
|
||||
freeCompilerArgs.add(DISABLE_PRE_IR)
|
||||
configureJsDefaultOptions()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-11
@@ -9,22 +9,15 @@ import org.jetbrains.kotlin.gradle.dsl.JsModuleKind
|
||||
import org.jetbrains.kotlin.gradle.dsl.JsSourceMapEmbedMode
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompilerOptions
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinOnlyTargetConfigurator
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
|
||||
|
||||
open class KotlinJsIrTargetConfigurator :
|
||||
KotlinOnlyTargetConfigurator<KotlinJsIrCompilation, KotlinJsIrTarget>(true) {
|
||||
|
||||
internal companion object {
|
||||
internal fun KotlinJsCompilerOptions.configureJsDefaultOptions(
|
||||
platformType: KotlinPlatformType,
|
||||
) {
|
||||
moduleKind.set(JsModuleKind.MODULE_UMD)
|
||||
sourceMap.set(true)
|
||||
sourceMapEmbedSources.set(JsSourceMapEmbedMode.SOURCE_MAP_SOURCE_CONTENT_NEVER)
|
||||
|
||||
if (platformType == KotlinPlatformType.wasm) {
|
||||
freeCompilerArgs.add(WASM_BACKEND)
|
||||
}
|
||||
internal fun KotlinJsCompilerOptions.configureJsDefaultOptions() {
|
||||
moduleKind.convention(JsModuleKind.MODULE_UMD)
|
||||
sourceMap.convention(true)
|
||||
sourceMapEmbedSources.convention(JsSourceMapEmbedMode.SOURCE_MAP_SOURCE_CONTENT_NEVER)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-86
@@ -35,10 +35,6 @@ import org.jetbrains.kotlin.gradle.plugin.statistics.UsesBuildFusService
|
||||
import org.jetbrains.kotlin.gradle.report.BuildReportMode
|
||||
import org.jetbrains.kotlin.gradle.targets.js.internal.LibraryFilterCachingService
|
||||
import org.jetbrains.kotlin.gradle.targets.js.internal.UsesLibraryFilterCachingService
|
||||
import org.jetbrains.kotlin.gradle.targets.js.ir.DISABLE_PRE_IR
|
||||
import org.jetbrains.kotlin.gradle.targets.js.ir.PRODUCE_JS
|
||||
import org.jetbrains.kotlin.gradle.targets.js.ir.PRODUCE_UNZIPPED_KLIB
|
||||
import org.jetbrains.kotlin.gradle.targets.js.ir.PRODUCE_ZIPPED_KLIB
|
||||
import org.jetbrains.kotlin.gradle.tasks.internal.KotlinJsOptionsCompat
|
||||
import org.jetbrains.kotlin.gradle.utils.getFile
|
||||
import org.jetbrains.kotlin.gradle.utils.isParentOf
|
||||
@@ -47,7 +43,6 @@ import org.jetbrains.kotlin.gradle.utils.toPathsArray
|
||||
import org.jetbrains.kotlin.incremental.ClasspathChanges
|
||||
import org.jetbrains.kotlin.library.impl.isKotlinLibrary
|
||||
import org.jetbrains.kotlin.statistics.metrics.BooleanMetrics
|
||||
import org.jetbrains.kotlin.utils.JsLibraryUtils
|
||||
import java.io.File
|
||||
import javax.inject.Inject
|
||||
|
||||
@@ -77,26 +72,11 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
||||
internal var incrementalJsKlib: Boolean = true
|
||||
|
||||
override fun isIncrementalCompilationEnabled(): Boolean {
|
||||
val freeArgs = enhancedFreeCompilerArgs.get()
|
||||
return when {
|
||||
PRODUCE_JS in freeArgs -> false
|
||||
|
||||
PRODUCE_UNZIPPED_KLIB in freeArgs -> {
|
||||
buildFusService.orNull?.reportFusMetrics {
|
||||
it.report(BooleanMetrics.JS_KLIB_INCREMENTAL, incrementalJsKlib)
|
||||
}
|
||||
incrementalJsKlib
|
||||
}
|
||||
|
||||
PRODUCE_ZIPPED_KLIB in freeArgs -> {
|
||||
buildFusService.orNull?.reportFusMetrics {
|
||||
it.report(BooleanMetrics.JS_KLIB_INCREMENTAL, incrementalJsKlib)
|
||||
}
|
||||
incrementalJsKlib
|
||||
}
|
||||
|
||||
else -> incremental
|
||||
val result = incrementalJsKlib || incremental
|
||||
buildFusService.orNull?.reportFusMetrics {
|
||||
it.report(BooleanMetrics.JS_KLIB_INCREMENTAL, result)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// Workaround to be able to use default value and change it later based on external input
|
||||
@@ -148,18 +128,14 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
||||
|
||||
KotlinJsCompilerOptionsHelper.fillCompilerArguments(compilerOptions, args)
|
||||
|
||||
if (isIrBackendEnabled()) {
|
||||
val outputFilePath: String? = compilerOptions.outputFile.orNull
|
||||
if (outputFilePath != null) {
|
||||
val outputFile = File(outputFilePath)
|
||||
args.outputDir = (if (outputFile.extension == "") outputFile else outputFile.parentFile).normalize().absolutePath
|
||||
args.moduleName = outputFile.nameWithoutExtension
|
||||
} else {
|
||||
args.outputDir = destinationDirectory.get().asFile.normalize().absolutePath
|
||||
args.moduleName = compilerOptions.moduleName.get()
|
||||
}
|
||||
val outputFilePath: String? = compilerOptions.outputFile.orNull
|
||||
if (outputFilePath != null) {
|
||||
val outputFile = File(outputFilePath)
|
||||
args.outputDir = (if (outputFile.extension == "") outputFile else outputFile.parentFile).normalize().absolutePath
|
||||
args.moduleName = outputFile.nameWithoutExtension
|
||||
} else {
|
||||
args.outputFile = outputFileProperty.get().absoluteFile.normalize().absolutePath
|
||||
args.outputDir = destinationDirectory.get().asFile.normalize().absolutePath
|
||||
args.moduleName = compilerOptions.moduleName.get()
|
||||
}
|
||||
|
||||
if (compilerOptions.usesK2.get()) {
|
||||
@@ -228,58 +204,15 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
||||
.directoryProperty()
|
||||
.value(project.layout.projectDirectory)
|
||||
|
||||
private fun isHybridKotlinJsLibrary(file: File): Boolean =
|
||||
JsLibraryUtils.isKotlinJavascriptLibrary(file) && isKotlinLibrary(file)
|
||||
|
||||
private val preIrBackendCompilerFlags = listOf(
|
||||
DISABLE_PRE_IR,
|
||||
PRODUCE_JS,
|
||||
PRODUCE_ZIPPED_KLIB
|
||||
)
|
||||
|
||||
private fun isPreIrBackendDisabled(): Boolean = enhancedFreeCompilerArgs
|
||||
.get()
|
||||
.any { preIrBackendCompilerFlags.contains(it) }
|
||||
|
||||
// see also isIncrementalCompilationEnabled
|
||||
private val irBackendCompilerFlags = listOf(
|
||||
PRODUCE_UNZIPPED_KLIB,
|
||||
PRODUCE_JS,
|
||||
PRODUCE_ZIPPED_KLIB
|
||||
)
|
||||
|
||||
private fun isIrBackendEnabled(): Boolean = enhancedFreeCompilerArgs
|
||||
.get()
|
||||
.any { irBackendCompilerFlags.contains(it) }
|
||||
|
||||
private val File.asLibraryFilterCacheKey: LibraryFilterCachingService.LibraryFilterCacheKey
|
||||
get() = LibraryFilterCachingService.LibraryFilterCacheKey(
|
||||
this,
|
||||
irEnabled = isIrBackendEnabled(),
|
||||
preIrDisabled = isPreIrBackendDisabled()
|
||||
this
|
||||
)
|
||||
|
||||
// Kotlin/JS can operate in 3 modes:
|
||||
// 1) purely pre-IR backend
|
||||
// 2) purely IR backend
|
||||
// 3) hybrid pre-IR and IR backend. Can only accept libraries with both JS and IR parts.
|
||||
private val libraryFilterBody: (File) -> Boolean
|
||||
get() = if (isIrBackendEnabled()) {
|
||||
if (isPreIrBackendDisabled()) {
|
||||
//::isKotlinLibrary
|
||||
// Workaround for KT-47797
|
||||
{ isKotlinLibrary(it) }
|
||||
} else {
|
||||
::isHybridKotlinJsLibrary
|
||||
}
|
||||
} else {
|
||||
JsLibraryUtils::isKotlinJavascriptLibrary
|
||||
}
|
||||
|
||||
@get:Internal
|
||||
protected val libraryFilter: (File) -> Boolean
|
||||
get() = { file ->
|
||||
libraryFilterCacheService.get().getOrCompute(file.asLibraryFilterCacheKey, libraryFilterBody)
|
||||
libraryFilterCacheService.get().getOrCompute(file.asLibraryFilterCacheKey, ::isKotlinLibrary)
|
||||
}
|
||||
|
||||
override val incrementalProps: List<FileCollection>
|
||||
@@ -287,21 +220,22 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
||||
|
||||
protected open fun processArgsBeforeCompile(args: K2JSCompilerArguments) = Unit
|
||||
|
||||
protected open fun contributeAdditionalCompilerArguments(context: ContributeCompilerArgumentsContext<K2JSCompilerArguments>) = Unit
|
||||
protected open fun contributeAdditionalCompilerArguments(context: ContributeCompilerArgumentsContext<K2JSCompilerArguments>) {
|
||||
context.primitive { args ->
|
||||
args.irOnly = true
|
||||
args.irProduceKlibDir = true
|
||||
}
|
||||
}
|
||||
|
||||
override fun callCompilerAsync(
|
||||
args: K2JSCompilerArguments,
|
||||
inputChanges: InputChanges,
|
||||
taskOutputsBackup: TaskOutputsBackup?
|
||||
taskOutputsBackup: TaskOutputsBackup?,
|
||||
) {
|
||||
logger.debug("Calling compiler")
|
||||
|
||||
validateOutputDirectory()
|
||||
|
||||
if (isIrBackendEnabled()) {
|
||||
logger.info(USING_JS_IR_BACKEND_MESSAGE)
|
||||
}
|
||||
|
||||
val dependencies = libraries
|
||||
.filter { it.exists() && libraryFilter(it) }
|
||||
.map { it.normalize().absolutePath }
|
||||
|
||||
-1
@@ -11,7 +11,6 @@ import org.gradle.api.tasks.TaskProvider
|
||||
const val KOTLIN_BUILD_DIR_NAME = "kotlin"
|
||||
const val USING_JVM_INCREMENTAL_COMPILATION_MESSAGE = "Using Kotlin/JVM incremental compilation"
|
||||
const val USING_JS_INCREMENTAL_COMPILATION_MESSAGE = "Using Kotlin/JS incremental compilation"
|
||||
const val USING_JS_IR_BACKEND_MESSAGE = "Using Kotlin/JS IR backend"
|
||||
|
||||
internal inline val <reified T : Task> T.thisTaskProvider: TaskProvider<out T>
|
||||
get() = checkNotNull(project.locateTask<T>(name))
|
||||
+10
-22
@@ -23,7 +23,7 @@ import java.io.File
|
||||
internal typealias Kotlin2JsCompileConfig = BaseKotlin2JsCompileConfig<Kotlin2JsCompile>
|
||||
|
||||
internal open class BaseKotlin2JsCompileConfig<TASK : Kotlin2JsCompile>(
|
||||
compilation: KotlinCompilationInfo
|
||||
compilation: KotlinCompilationInfo,
|
||||
) : AbstractKotlinCompileConfig<TASK>(compilation) {
|
||||
|
||||
init {
|
||||
@@ -90,7 +90,7 @@ internal open class BaseKotlin2JsCompileConfig<TASK : Kotlin2JsCompile>(
|
||||
|
||||
protected open fun configureAdditionalFreeCompilerArguments(
|
||||
task: TASK,
|
||||
compilation: KotlinCompilationInfo
|
||||
compilation: KotlinCompilationInfo,
|
||||
) {
|
||||
task.enhancedFreeCompilerArgs.value(
|
||||
task.compilerOptions.freeCompilerArgs.map { freeArgs ->
|
||||
@@ -102,28 +102,16 @@ internal open class BaseKotlin2JsCompileConfig<TASK : Kotlin2JsCompile>(
|
||||
}
|
||||
|
||||
protected fun MutableList<String>.commonJsAdditionalCompilerFlags(
|
||||
compilation: KotlinCompilationInfo
|
||||
compilation: KotlinCompilationInfo,
|
||||
) {
|
||||
if (contains(DISABLE_PRE_IR) &&
|
||||
!contains(PRODUCE_UNZIPPED_KLIB) &&
|
||||
!contains(PRODUCE_ZIPPED_KLIB)
|
||||
) {
|
||||
add(PRODUCE_UNZIPPED_KLIB)
|
||||
// Configure FQ module name to avoid cyclic dependencies in klib manifests (see KT-36721).
|
||||
val baseName = if (compilation.isMain) {
|
||||
project.name
|
||||
} else {
|
||||
"${project.name}_${compilation.compilationName}"
|
||||
}
|
||||
|
||||
if (contains(PRODUCE_JS) ||
|
||||
contains(PRODUCE_UNZIPPED_KLIB) ||
|
||||
contains(PRODUCE_ZIPPED_KLIB)
|
||||
) {
|
||||
// Configure FQ module name to avoid cyclic dependencies in klib manifests (see KT-36721).
|
||||
val baseName = if (compilation.isMain) {
|
||||
project.name
|
||||
} else {
|
||||
"${project.name}_${compilation.compilationName}"
|
||||
}
|
||||
if (none { it.startsWith(KLIB_MODULE_NAME) }) {
|
||||
add("$KLIB_MODULE_NAME=${project.klibModuleName(baseName)}")
|
||||
}
|
||||
if (none { it.startsWith(KLIB_MODULE_NAME) }) {
|
||||
add("$KLIB_MODULE_NAME=${project.klibModuleName(baseName)}")
|
||||
}
|
||||
|
||||
if (compilation.platformType == KotlinPlatformType.wasm) {
|
||||
|
||||
-2
@@ -95,8 +95,6 @@ internal open class KotlinJsIrLinkConfig(
|
||||
if (none { it.startsWith(arg) }) add(arg)
|
||||
}
|
||||
|
||||
add(PRODUCE_JS)
|
||||
|
||||
if (compilation.platformType == KotlinPlatformType.wasm) {
|
||||
add(WASM_BACKEND)
|
||||
val wasmTargetType = ((compilation.origin as KotlinJsIrCompilation).target as KotlinJsIrTarget).wasmTargetType!!
|
||||
|
||||
Reference in New Issue
Block a user