Robert Jaros
09/09/2024, 12:39 PMbashor
09/09/2024, 4:33 PMbashor
09/09/2024, 4:34 PMrootProject.the<org.jetbrains.kotlin.gradle.targets.js.binaryen.BinaryenRootExtension>().apply {
version = "117"
}
bashor
09/09/2024, 4:35 PMbashor
09/09/2024, 4:35 PMRobert Jaros
09/09/2024, 4:36 PMbashor
09/09/2024, 5:10 PMbashor
09/09/2024, 5:13 PMRobert Jaros
09/09/2024, 5:53 PMRobert Jaros
09/09/2024, 5:54 PMbashor
09/09/2024, 5:54 PMRobert Jaros
09/09/2024, 6:09 PMbashor
09/09/2024, 6:14 PMAhmed na
09/10/2024, 2:09 AM> Task :webApp:compileProductionExecutableKotlinWasmJsOptimize FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':webApp:compileProductionExecutableKotlinWasmJsOptimize'.
> Process 'command 'root-project/.gradle/binaryen/binaryen-version_118/bin/wasm-opt'' finished with non-zero exit value 139
Ahmed na
09/10/2024, 2:10 AMbashor
09/10/2024, 6:00 AMAhmed na
09/10/2024, 9:36 PM// root gradle.properties
kotlin.daemon.jvmargs=-Xmx6g -Xms3g
// project/build.gradle.kts
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.binaryen.BinaryenRootExtension>().apply {
version = "117"
}
tasks.withType<org.jetbrains.kotlin.gradle.targets.js.binaryen.BinaryenExec> {
binaryenArgs = mutableListOf(
// Required flags:
"--enable-gc",
"--enable-reference-types",
"--enable-exception-handling",
"--enable-bulk-memory",
"--enable-nontrapping-float-to-int",
// Optional flags (can be removed):
"--inline-functions-with-loops",
"--traps-never-happen",
"--fast-math",
// "-O3", <--- comment this
// "-O3", <--- comment this
"--gufa",
// "-O3", <--- comment this
// "-O3", <--- comment this
"-Oz",
)
}
then run
export BINARYEN_PASS_DEBUG=1
./gradlew :webApp:wasmJsBrowserDistribution --no-configuration-cache