[WASM] Add text section to implement debug info

This commit is contained in:
Igor Yakovlev
2021-09-14 19:59:14 +02:00
committed by teamcityserver
parent 8286927e8c
commit b8d11f7938
7 changed files with 45 additions and 13 deletions
@@ -310,7 +310,8 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
module,
PhaseConfig(wasmPhases),
IrFactoryImpl,
exportedDeclarations = setOf(FqName("main"))
exportedDeclarations = setOf(FqName("main")),
emitNameSection = arguments.wasmDebug,
)
val outputWasmFile = outputFile.withReplacedExtensionOrNull(outputFile.extension, "wasm")!!
outputWasmFile.writeBytes(res.wasm)