[Wasm] Don't squish modules together

This commit is contained in:
Igor Laevsky
2022-01-27 21:30:48 +02:00
committed by TeamCityServer
parent 259d6b82c4
commit 4e84e14d34
6 changed files with 52 additions and 31 deletions
@@ -321,7 +321,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
if (arguments.wasm) {
val (moduleFragment, backendContext) = compileToLoweredIr(
val (allModules, backendContext) = compileToLoweredIr(
depsDescriptors = module,
phaseConfig = PhaseConfig(wasmPhases),
irFactory = IrFactoryImpl,
@@ -329,7 +329,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
propertyLazyInitialization = arguments.irPropertyLazyInitialization,
)
val res = compileWasm(
moduleFragment = moduleFragment,
allModules = allModules,
backendContext = backendContext,
emitNameSection = arguments.wasmDebug,
dceEnabled = arguments.irDce,