[Wasm] Fix wasm-target compiler key in gradle plugin
This commit is contained in:
committed by
Space Team
parent
a3aa1f6121
commit
87ab88957d
+1
-1
@@ -29,4 +29,4 @@ internal const val PER_MODULE = "-Xir-per-module"
|
||||
internal const val PER_MODULE_OUTPUT_NAME = "-Xir-per-module-output-name"
|
||||
|
||||
internal const val WASM_BACKEND = "-Xwasm"
|
||||
internal const val WASM_WASI_MODE = "-Xwasm-wasi-mode"
|
||||
internal const val WASM_TARGET = "-Xwasm-target"
|
||||
|
||||
+2
-3
@@ -109,9 +109,8 @@ internal open class BaseKotlin2JsCompileConfig<TASK : Kotlin2JsCompile>(
|
||||
if (compilation.platformType == KotlinPlatformType.wasm) {
|
||||
add(WASM_BACKEND)
|
||||
val wasmTargetType = ((compilation.origin as KotlinJsIrCompilation).target as KotlinJsIrTarget).wasmTargetType!!
|
||||
if (wasmTargetType == KotlinWasmTargetType.WASI) {
|
||||
add(WASM_WASI_MODE)
|
||||
}
|
||||
val targetValue = if (wasmTargetType == KotlinWasmTargetType.WASI) "wasm-wasi" else "wasm-js"
|
||||
add("$WASM_TARGET=$targetValue")
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -100,9 +100,8 @@ internal open class KotlinJsIrLinkConfig(
|
||||
if (compilation.platformType == KotlinPlatformType.wasm) {
|
||||
add(WASM_BACKEND)
|
||||
val wasmTargetType = ((compilation.origin as KotlinJsIrCompilation).target as KotlinJsIrTarget).wasmTargetType!!
|
||||
if (wasmTargetType == KotlinWasmTargetType.WASI) {
|
||||
add(WASM_WASI_MODE)
|
||||
}
|
||||
val targetValue = if (wasmTargetType == KotlinWasmTargetType.WASI) "wasm-wasi" else "wasm-js"
|
||||
add("$WASM_TARGET=$targetValue")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user