@@ -51,9 +51,7 @@ fun compileWasmArgs(
5151 " -ir-output-name=$moduleName " ,
5252 ).also {
5353 if (icDir != null ) {
54- typeInfoArg(icDir, log)?.let { stdlibTypeInfoArg ->
55- it.add(stdlibTypeInfoArg)
56- }
54+ it.add(" -Xwasm-multimodule-mode=slave" )
5755 }
5856 } + compilerPluginsArgs
5957
@@ -67,7 +65,6 @@ fun linkWasmArgs(
6765 icDir : Path ? ,
6866 outputDir : Path ,
6967 debugInfo : Boolean ,
70- log : (String ) -> Unit ,
7168): List <String > {
7269 return mutableListOf (
7370 " -Xreport-all-warnings" ,
@@ -82,37 +79,11 @@ fun linkWasmArgs(
8279 if (debugInfo) it.add(" -Xwasm-generate-wat" )
8380
8481 if (icDir != null ) {
85- typeInfoArg(icDir, log)?.let { stdlibTypeInfoArg ->
86- it.add(stdlibTypeInfoArg)
87- }
82+ it.add(" -Xwasm-multimodule-mode=slave" )
8883 } else {
8984 it.add(" -Xir-dce" )
9085 }
9186 }
9287}
9388
94- private fun typeInfoArg (
95- icDir : Path ,
96- log : (String ) -> Unit ,
97- ): String? {
98- val allTypeInfoFiles = icDir.toFile().listFiles() ? : run {
99- log(" No typeinfo files in $icDir , probably you need to run :cache-maker:prepareTypeInfoIntoComposeWasmCache task" )
100- return null
101- }
102-
103- val stdlibTypeInfo = allTypeInfoFiles
104- .firstOrNull { file -> file.name.endsWith(" .typeinfo.bin" ) }
105-
106- if (stdlibTypeInfo == null ) {
107- log(" No typeinfo files in $icDir , probably you need to run :cache-maker:prepareTypeInfoIntoComposeWasmCache task" )
108- return null
109- }
110-
111- if (allTypeInfoFiles.size > 1 ) {
112- log(" There are more than 1 typeinfo files in $icDir : ${allTypeInfoFiles.joinToString(" , " ) { it.name }} " )
113- }
114-
115- return " -Xwasm-typeinfo-file=${stdlibTypeInfo.normalize().absolutePath} "
116- }
117-
11889val PATH_SEPARATOR : String = File .pathSeparator
0 commit comments