[JS IR] Add per-module output module name

This commit is contained in:
Ilya Goncharov
2021-05-04 15:37:24 +03:00
committed by TeamCityServer
parent 4d7f7fc50f
commit 228c6879f5
7 changed files with 43 additions and 35 deletions
@@ -207,8 +207,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
irFactory = PersistentIrFactory(), // TODO IrFactoryImpl?
outputKlibPath = outputFile.path,
nopack = arguments.irProduceKlibDir,
jsOutputName = moduleName
.substringAfterLast(":"),
jsOutputName = arguments.irPerModuleOutputName,
)
}
@@ -277,7 +276,6 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
relativeRequirePath = true,
propertyLazyInitialization = arguments.irPropertyLazyInitialization,
legacyPropertyAccess = arguments.irLegacyPropertyAccess,
irPerModulePrefix = arguments.irPerModulePrefix
)
val jsCode = if (arguments.irDce && !arguments.irDceDriven) compiledModule.dceJsCode!! else compiledModule.jsCode!!