[Wasm] Add kotlin wasm wasi mode compiler flag

This commit is contained in:
Igor Yakovlev
2023-06-29 16:11:21 +02:00
committed by Space Team
parent 7c7aa98875
commit 750653e4b3
6 changed files with 33 additions and 0 deletions
@@ -121,6 +121,9 @@ public class JSConfigurationKeys {
public static final CompilerConfigurationKey<Boolean> WASM_GENERATE_WAT =
CompilerConfigurationKey.create("generate wat file");
public static final CompilerConfigurationKey<WasmTarget> WASM_TARGET =
CompilerConfigurationKey.create("wasm target");
public static final CompilerConfigurationKey<ZipFileSystemAccessor> ZIP_FILE_SYSTEM_ACCESSOR =
CompilerConfigurationKey.create("zip file system accessor, used for klib reading");
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.js.config
enum class WasmTarget {
JS,
WASI;
companion object {
fun fromName(name: String): WasmTarget? = when (name) {
"wasm-js" -> JS
"wasm-wasi" -> WASI
else -> null
}
}
}