[Wasm] Introduce Xwasm-generate-wat compiler flag (disabled by default)

This commit is contained in:
Igor Yakovlev
2022-12-27 17:45:44 +01:00
committed by teamcity
parent fc80104d55
commit 71afbb36f5
4 changed files with 9 additions and 1 deletions
@@ -200,6 +200,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
configuration.put(JSConfigurationKeys.WASM_ENABLE_ARRAY_RANGE_CHECKS, arguments.wasmEnableArrayRangeChecks)
configuration.put(JSConfigurationKeys.WASM_ENABLE_ASSERTS, arguments.wasmEnableAsserts)
configuration.put(JSConfigurationKeys.WASM_GENERATE_WAT, arguments.wasmGenerateWat)
val commonSourcesArray = arguments.commonSources
val commonSources = commonSourcesArray?.toSet() ?: emptySet()
@@ -376,7 +377,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
baseFileName = outputName,
emitNameSection = arguments.wasmDebug,
allowIncompleteImplementations = arguments.irDce,
generateWat = true,
generateWat = configuration.get(JSConfigurationKeys.WASM_GENERATE_WAT, false),
generateSourceMaps = generateSourceMaps
)